Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/modular app templates #34

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

PierreJeanjacquot
Copy link
Member

@PierreJeanjacquot PierreJeanjacquot commented Dec 11, 2024

modular template

choose init type (hello-world or advanced)

image
image

  • hello-world - get started with a simple "hello-world" app (only use args)

image

  • advanced - pick the features you want
    • args
    • protected data
    • input files
    • requester secrets
    • app secret

image

User choices produce a template with selected features (technically we strip unwanted features from a "full-featured" template)

misc

  • protectedData mock is now stored in mock/protectedData and copied in input folder when needed
  • input is now cleaned before each iapp test
  • iapp.config.json has been added to ignore files as it may contain some secrets

@PierreJeanjacquot PierreJeanjacquot self-assigned this Dec 11, 2024
@PierreJeanjacquot PierreJeanjacquot marked this pull request as ready for review December 16, 2024 13:07
@@ -11,6 +11,7 @@ export const TEST_INPUT_DIR = 'input';
export const TEST_OUTPUT_DIR = 'output';
export const RUN_OUTPUT_DIR = 'output'; // Same as TEST_OUTPUT_DIR
export const CACHE_DIR = 'cache';
export const PROTECTED_DATA_MOCK_DIR = 'mock/protectedData';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ProtectedData mocks are stored in mock/protectedData, we may want to store them in cache/mock/protectedData for lesser visibility?
This is a preliminary refactor to enable supporting multiple protectedData mocks; a default protectedData mock is provided.

Copy link
Collaborator

@Le-Caignec Le-Caignec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work 💪🏻💪🏻

cli/src/cmd/init.js Show resolved Hide resolved
cli/src/cmd/init.js Show resolved Hide resolved
type: 'confirm',
name: 'useRequesterSecret',
message:
'Would you like to use requester secrets inside your iApp? (requester secrets are secrets provisioned by the user)',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'Would you like to use requester secrets inside your iApp? (requester secrets are secrets provisioned by the user)',
'Would you like to use requester secrets inside your iApp? (requester secrets are secrets that will be provided by any users that will run your iapp)',

type: 'confirm',
name: 'useAppSecret',
message:
'Would you like to use an app secret inside your iApp? (app secret is a secret provisioned by the app owner)',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'Would you like to use an app secret inside your iApp? (app secret is a secret provisioned by the app owner)',
'Would you like to use an app secret inside your iApp? (app secret is a secret provisioned by the app owner linked to your iapp that will never changed)',

message: 'What kind of project do you want to init?',
choices: [
{
title: 'hello-world',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you think about using PascalCase here ?

Suggested change
title: 'hello-world',
title: 'HelloWorld',

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants