@adobe/ccweb-add-on-scaffolder 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.c8rc.json +7 -0
- package/.mocharc.json +5 -0
- package/CODE_OF_CONDUCT.md +79 -0
- package/CONTRIBUTING.md +47 -0
- package/LICENSE +21 -0
- package/README.md +11 -0
- package/dist/app/AddOnBuilder.d.ts +72 -0
- package/dist/app/AddOnBuilder.d.ts.map +1 -0
- package/dist/app/AddOnBuilder.js +25 -0
- package/dist/app/AddOnScaffolder.d.ts +36 -0
- package/dist/app/AddOnScaffolder.d.ts.map +1 -0
- package/dist/app/AddOnScaffolder.js +25 -0
- package/dist/app/PackageBuilder.d.ts +38 -0
- package/dist/app/PackageBuilder.d.ts.map +1 -0
- package/dist/app/PackageBuilder.js +25 -0
- package/dist/app/TemplateAddOnBuilder.d.ts +90 -0
- package/dist/app/TemplateAddOnBuilder.d.ts.map +1 -0
- package/dist/app/TemplateAddOnBuilder.js +273 -0
- package/dist/app/TemplateAddOnScaffolder.d.ts +63 -0
- package/dist/app/TemplateAddOnScaffolder.d.ts.map +1 -0
- package/dist/app/TemplateAddOnScaffolder.js +130 -0
- package/dist/app/TemplatePackageBuilder.d.ts +49 -0
- package/dist/app/TemplatePackageBuilder.d.ts.map +1 -0
- package/dist/app/TemplatePackageBuilder.js +92 -0
- package/dist/app/index.d.ts +30 -0
- package/dist/app/index.d.ts.map +1 -0
- package/dist/app/index.js +30 -0
- package/dist/config/index.d.ts +26 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +26 -0
- package/dist/config/inversify.config.d.ts +27 -0
- package/dist/config/inversify.config.d.ts.map +1 -0
- package/dist/config/inversify.config.js +47 -0
- package/dist/config/inversify.types.d.ts +31 -0
- package/dist/config/inversify.types.d.ts.map +1 -0
- package/dist/config/inversify.types.js +31 -0
- package/dist/constants.d.ts +33 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +34 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +28 -0
- package/dist/models/ScaffolderOptions.d.ts +65 -0
- package/dist/models/ScaffolderOptions.d.ts.map +1 -0
- package/dist/models/ScaffolderOptions.js +71 -0
- package/dist/models/index.d.ts +25 -0
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/index.js +25 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/validators/AddOnTemplateValidator.d.ts +46 -0
- package/dist/validators/AddOnTemplateValidator.d.ts.map +1 -0
- package/dist/validators/AddOnTemplateValidator.js +78 -0
- package/dist/validators/TemplateValidator.d.ts +35 -0
- package/dist/validators/TemplateValidator.d.ts.map +1 -0
- package/dist/validators/TemplateValidator.js +25 -0
- package/dist/validators/index.d.ts +26 -0
- package/dist/validators/index.d.ts.map +1 -0
- package/dist/validators/index.js +26 -0
- package/package.json +57 -0
- package/src/app/AddOnBuilder.ts +79 -0
- package/src/app/AddOnScaffolder.ts +37 -0
- package/src/app/PackageBuilder.ts +40 -0
- package/src/app/TemplateAddOnBuilder.ts +319 -0
- package/src/app/TemplateAddOnScaffolder.ts +153 -0
- package/src/app/TemplatePackageBuilder.ts +102 -0
- package/src/app/index.ts +30 -0
- package/src/config/index.ts +26 -0
- package/src/config/inversify.config.ts +58 -0
- package/src/config/inversify.types.ts +31 -0
- package/src/constants.ts +36 -0
- package/src/index.ts +28 -0
- package/src/models/ScaffolderOptions.ts +86 -0
- package/src/models/index.ts +25 -0
- package/src/test/app/TemplateAddOnBuilder.spec.ts +1391 -0
- package/src/test/app/TemplateAddOnScaffolder.spec.ts +272 -0
- package/src/test/app/TemplatePackageBuilder.spec.ts +332 -0
- package/src/test/app/data/first-test-app/.template/template.json +10 -0
- package/src/test/app/data/first-test-app/package.json +19 -0
- package/src/test/app/data/first-test-app/src/manifest.json +21 -0
- package/src/test/app/data/first_test_app/.template/template.json +10 -0
- package/src/test/app/data/first_test_app/package.json +19 -0
- package/src/test/app/data/first_test_app/src/manifest.json +21 -0
- package/src/test/app/data/second-test-app/package.json +19 -0
- package/src/test/app/data/second-test-app/src/manifest.json +33 -0
- package/src/test/app/data/third-test-app/.template/template.json +10 -0
- package/src/test/app/data/third-test-app/package.json +19 -0
- package/src/test/app/data/third-test-app/src/manifest.json +23 -0
- package/src/test/models/ScaffolderOptions.spec.ts +61 -0
- package/src/test/validators/AppTemplateValidator.spec.ts +98 -0
- package/src/validators/AddOnTemplateValidator.ts +79 -0
- package/src/validators/TemplateValidator.ts +35 -0
- package/src/validators/index.ts +26 -0
- package/tsconfig.json +28 -0
package/.c8rc.json
ADDED
package/.mocharc.json
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Adobe Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our project and community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
|
|
6
|
+
|
|
7
|
+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
|
8
|
+
|
|
9
|
+
## Our Standards
|
|
10
|
+
|
|
11
|
+
Examples of behavior that contribute to a positive environment for our project and community include:
|
|
12
|
+
|
|
13
|
+
- Demonstrating empathy and kindness toward other people
|
|
14
|
+
- Being respectful of differing opinions, viewpoints, and experiences
|
|
15
|
+
- Giving and gracefully accepting constructive feedback
|
|
16
|
+
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
|
17
|
+
- Focusing on what is best, not just for us as individuals but for the overall community
|
|
18
|
+
|
|
19
|
+
Examples of unacceptable behavior include:
|
|
20
|
+
|
|
21
|
+
- The use of sexualized language or imagery, and sexual attention or advances of any kind
|
|
22
|
+
- Trolling, insulting or derogatory comments, and personal or political attacks
|
|
23
|
+
- Public or private harassment
|
|
24
|
+
- Publishing others’ private information, such as a physical or email address, without their explicit permission
|
|
25
|
+
- Other conduct which could reasonably be considered inappropriate in a professional setting
|
|
26
|
+
|
|
27
|
+
## Our Responsibilities
|
|
28
|
+
|
|
29
|
+
Project maintainers are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
|
30
|
+
|
|
31
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
|
32
|
+
|
|
33
|
+
## Scope
|
|
34
|
+
|
|
35
|
+
This Code of Conduct applies when an individual is representing the project or its community both within project spaces and in public spaces. Examples of representing a project or community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
|
36
|
+
|
|
37
|
+
## Enforcement
|
|
38
|
+
|
|
39
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by first contacting the project team. Oversight of Adobe projects is handled by the Adobe Open Source Office, which has final say in any violations and enforcement of this Code of Conduct and can be reached at Grp-opensourceoffice@adobe.com. All complaints will be reviewed and investigated promptly and fairly.
|
|
40
|
+
|
|
41
|
+
The project team must respect the privacy and security of the reporter of any incident.
|
|
42
|
+
|
|
43
|
+
Project maintainers who do not follow or enforce the Code of Conduct may face temporary or permanent repercussions as determined by other members of the project's leadership or the Adobe Open Source Office.
|
|
44
|
+
|
|
45
|
+
## Enforcement Guidelines
|
|
46
|
+
|
|
47
|
+
Project maintainers will follow these Community Impact Guidelines in determining the consequences for any action they deem to be in violation of this Code of Conduct:
|
|
48
|
+
|
|
49
|
+
**1. Correction**
|
|
50
|
+
|
|
51
|
+
Community Impact: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
|
52
|
+
|
|
53
|
+
Consequence: A private, written warning from project maintainers describing the violation and why the behavior was unacceptable. A public apology may be requested from the violator before any further involvement in the project by violator.
|
|
54
|
+
|
|
55
|
+
**2. Warning**
|
|
56
|
+
|
|
57
|
+
Community Impact: A relatively minor violation through a single incident or series of actions.
|
|
58
|
+
|
|
59
|
+
Consequence: A written warning from project maintainers that includes stated consequences for continued unacceptable behavior. Violator must refrain from interacting with the people involved for a specified period of time as determined by the project maintainers, including, but not limited to, unsolicited interaction with those enforcing the Code of Conduct through channels such as community spaces and social media. Continued violations may lead to a temporary or permanent ban.
|
|
60
|
+
|
|
61
|
+
**3. Temporary Ban**
|
|
62
|
+
|
|
63
|
+
Community Impact: A more serious violation of community standards, including sustained unacceptable behavior.
|
|
64
|
+
|
|
65
|
+
Consequence: A temporary ban from any interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Failure to comply with the temporary ban may lead to a permanent ban.
|
|
66
|
+
|
|
67
|
+
**4. Permanent Ban**
|
|
68
|
+
|
|
69
|
+
Community Impact: Demonstrating a consistent pattern of violation of community standards or an egregious violation of community standards, including, but not limited to, sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
|
70
|
+
|
|
71
|
+
Consequence: A permanent ban from any interaction with the community.
|
|
72
|
+
|
|
73
|
+
## Attribution
|
|
74
|
+
|
|
75
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1,
|
|
76
|
+
available at [http://contributor-covenant.org/version/2/1][version]
|
|
77
|
+
|
|
78
|
+
[homepage]: http://contributor-covenant.org
|
|
79
|
+
[version]: http://contributor-covenant.org/version/2/1
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thanks for choosing to contribute!
|
|
4
|
+
|
|
5
|
+
The following are a set of guidelines to follow when contributing to this project.
|
|
6
|
+
|
|
7
|
+
## Code Of Conduct
|
|
8
|
+
|
|
9
|
+
This project adheres to the Adobe [code of conduct](../CODE_OF_CONDUCT.md). By participating,
|
|
10
|
+
you are expected to uphold this code. Please report unacceptable behavior to
|
|
11
|
+
[Grp-opensourceoffice@adobe.com](mailto:Grp-opensourceoffice@adobe.com).
|
|
12
|
+
|
|
13
|
+
## Have A Question?
|
|
14
|
+
|
|
15
|
+
Start by filing an issue. The existing committers on this project work to reach
|
|
16
|
+
consensus around project direction and issue solutions within issue threads
|
|
17
|
+
(when appropriate).
|
|
18
|
+
|
|
19
|
+
## Contributor License Agreement
|
|
20
|
+
|
|
21
|
+
All third-party contributions to this project must be accompanied by a signed contributor
|
|
22
|
+
license agreement. This gives Adobe permission to redistribute your contributions
|
|
23
|
+
as part of the project. [Sign our CLA](https://opensource.adobe.com/cla.html). You
|
|
24
|
+
only need to submit an Adobe CLA one time, so if you have submitted one previously,
|
|
25
|
+
you are good to go!
|
|
26
|
+
|
|
27
|
+
## Code Reviews
|
|
28
|
+
|
|
29
|
+
All submissions should come in the form of pull requests and need to be reviewed
|
|
30
|
+
by project committers. Read [GitHub's pull request documentation](https://help.github.com/articles/about-pull-requests/)
|
|
31
|
+
for more information on sending pull requests.
|
|
32
|
+
|
|
33
|
+
Lastly, please follow the [pull request template](PULL_REQUEST_TEMPLATE.md) when
|
|
34
|
+
submitting a pull request!
|
|
35
|
+
|
|
36
|
+
## From Contributor To Committer
|
|
37
|
+
|
|
38
|
+
We love contributions from our community! If you'd like to go a step beyond contributor
|
|
39
|
+
and become a committer with full write access and a say in the project, you must
|
|
40
|
+
be invited to the project. The existing committers employ an internal nomination
|
|
41
|
+
process that must reach lazy consensus (silence is approval) before invitations
|
|
42
|
+
are issued. If you feel you are qualified and want to get more deeply involved,
|
|
43
|
+
feel free to reach out to existing committers to have a conversation about that.
|
|
44
|
+
|
|
45
|
+
## Security Issues
|
|
46
|
+
|
|
47
|
+
Security issues shouldn't be reported on this issue tracker. Instead, [file an issue to our security experts](https://helpx.adobe.com/security/alertus.html).
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
© Copyright 2023 Adobe. All rights reserved.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# @adobe/ccweb-add-on-scaffolder
|
|
2
|
+
|
|
3
|
+
[](https://npmjs.org/package/@adobe/ccweb-add-on-scaffolder)
|
|
4
|
+
[](https://npmjs.org/package/@adobe/ccweb-add-on-scaffolder)
|
|
5
|
+
[](https://opensource.org/license/mit)
|
|
6
|
+
|
|
7
|
+
## Description
|
|
8
|
+
|
|
9
|
+
This package provides libraries for scaffolding a new add-on project from the template provided to [@adobe/create-ccweb-add-on](https://www.npmjs.com/package/@adobe/create-ccweb-add-on).
|
|
10
|
+
|
|
11
|
+
For more information about developing Adobe Express add-ons, check out the [documentation](https://developer.adobe.com/express/add-ons/).
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* MIT License
|
|
3
|
+
|
|
4
|
+
* © Copyright 2023 Adobe. All rights reserved.
|
|
5
|
+
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
********************************************************************************/
|
|
24
|
+
import type { PackageJson, TemplateJson } from "@adobe/ccweb-add-on-core";
|
|
25
|
+
import "reflect-metadata";
|
|
26
|
+
import type { ScaffolderOptions } from "../models/ScaffolderOptions.js";
|
|
27
|
+
/**
|
|
28
|
+
* Add-on builder interface for constructing the Add-on project.
|
|
29
|
+
*/
|
|
30
|
+
export interface AddOnBuilder {
|
|
31
|
+
/**
|
|
32
|
+
* Get {@link PackageJson}.
|
|
33
|
+
*
|
|
34
|
+
* @returns Reference of {@link PackageJson}.
|
|
35
|
+
*/
|
|
36
|
+
getPackageJson(): PackageJson;
|
|
37
|
+
/**
|
|
38
|
+
* Get {@link TemplateJson}.
|
|
39
|
+
*
|
|
40
|
+
* @returns Reference of {@link TemplateJson}.
|
|
41
|
+
*/
|
|
42
|
+
getTemplateJson(): TemplateJson;
|
|
43
|
+
/**
|
|
44
|
+
* Get template devDependencies.
|
|
45
|
+
*
|
|
46
|
+
* @param template - {@link TemplateJson}
|
|
47
|
+
* @returns Set of template devDependencies.
|
|
48
|
+
*/
|
|
49
|
+
getDevDependenciesToInstall(template: TemplateJson): Set<string>;
|
|
50
|
+
/**
|
|
51
|
+
* Get template dependencies.
|
|
52
|
+
*
|
|
53
|
+
* @param template - {@link TemplateJson}
|
|
54
|
+
* @returns Set of template dependencies.
|
|
55
|
+
*/
|
|
56
|
+
getDependenciesToInstall(template: TemplateJson): Set<string>;
|
|
57
|
+
/**
|
|
58
|
+
* Build the Add-on.
|
|
59
|
+
*
|
|
60
|
+
* @param packageJson - {@link PackageJson}
|
|
61
|
+
*/
|
|
62
|
+
build(packageJson: string): void;
|
|
63
|
+
/**
|
|
64
|
+
* Display success message.
|
|
65
|
+
*/
|
|
66
|
+
displaySuccess(): void;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Add-on builder factory.
|
|
70
|
+
*/
|
|
71
|
+
export declare type AddOnBuilderFactory = (options: ScaffolderOptions) => AddOnBuilder;
|
|
72
|
+
//# sourceMappingURL=AddOnBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AddOnBuilder.d.ts","sourceRoot":"","sources":["../../src/app/AddOnBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;kFAsBkF;AAElF,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAExE;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB;;;;OAIG;IACH,cAAc,IAAI,WAAW,CAAC;IAE9B;;;;OAIG;IACH,eAAe,IAAI,YAAY,CAAC;IAEhC;;;;;OAKG;IACH,2BAA2B,CAAC,QAAQ,EAAE,YAAY,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;IAEjE;;;;;OAKG;IACH,wBAAwB,CAAC,QAAQ,EAAE,YAAY,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;IAE9D;;;;OAIG;IACH,KAAK,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjC;;OAEG;IACH,cAAc,IAAI,IAAI,CAAC;CAC1B;AAED;;GAEG;AACH,oBAAY,mBAAmB,GAAG,CAAC,OAAO,EAAE,iBAAiB,KAAK,YAAY,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* MIT License
|
|
3
|
+
|
|
4
|
+
* © Copyright 2023 Adobe. All rights reserved.
|
|
5
|
+
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
********************************************************************************/
|
|
24
|
+
import "reflect-metadata";
|
|
25
|
+
//# sourceMappingURL=AddOnBuilder.js.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* MIT License
|
|
3
|
+
|
|
4
|
+
* © Copyright 2023 Adobe. All rights reserved.
|
|
5
|
+
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
********************************************************************************/
|
|
24
|
+
import type { ScaffolderOptions } from "../models/ScaffolderOptions.js";
|
|
25
|
+
/**
|
|
26
|
+
* Add-on scaffolder interface for orchestrating the creation of the Add-on project.
|
|
27
|
+
*/
|
|
28
|
+
export interface AddOnScaffolder {
|
|
29
|
+
/**
|
|
30
|
+
* Run the scaffolder to create the Add-on project from the provided options.
|
|
31
|
+
* @param options - {@link ScaffolderOptions} reference.
|
|
32
|
+
* @returns Promise.
|
|
33
|
+
*/
|
|
34
|
+
run(options: ScaffolderOptions): Promise<void>;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=AddOnScaffolder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AddOnScaffolder.d.ts","sourceRoot":"","sources":["../../src/app/AddOnScaffolder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;kFAsBkF;AAElF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAExE;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B;;;;OAIG;IACH,GAAG,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAClD"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* MIT License
|
|
3
|
+
|
|
4
|
+
* © Copyright 2023 Adobe. All rights reserved.
|
|
5
|
+
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
********************************************************************************/
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=AddOnScaffolder.js.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* MIT License
|
|
3
|
+
|
|
4
|
+
* © Copyright 2023 Adobe. All rights reserved.
|
|
5
|
+
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
********************************************************************************/
|
|
24
|
+
import type { PackageJson, TemplateJson } from "@adobe/ccweb-add-on-core";
|
|
25
|
+
/**
|
|
26
|
+
* Package builder interface for constructing the package.json of the Add-on project.
|
|
27
|
+
*/
|
|
28
|
+
export interface PackageBuilder {
|
|
29
|
+
/**
|
|
30
|
+
* Build {@link PackageJson}.
|
|
31
|
+
*/
|
|
32
|
+
build(): PackageJson;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Package builder factory.
|
|
36
|
+
*/
|
|
37
|
+
export declare type PackageBuilderFactory = (packageJson: PackageJson) => (templateJson: TemplateJson) => PackageBuilder;
|
|
38
|
+
//# sourceMappingURL=PackageBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PackageBuilder.d.ts","sourceRoot":"","sources":["../../src/app/PackageBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;kFAsBkF;AAElF,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE1E;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B;;OAEG;IACH,KAAK,IAAI,WAAW,CAAC;CACxB;AAED;;GAEG;AACH,oBAAY,qBAAqB,GAAG,CAAC,WAAW,EAAE,WAAW,KAAK,CAAC,YAAY,EAAE,YAAY,KAAK,cAAc,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* MIT License
|
|
3
|
+
|
|
4
|
+
* © Copyright 2023 Adobe. All rights reserved.
|
|
5
|
+
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
********************************************************************************/
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=PackageBuilder.js.map
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* MIT License
|
|
3
|
+
|
|
4
|
+
* © Copyright 2023 Adobe. All rights reserved.
|
|
5
|
+
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
********************************************************************************/
|
|
24
|
+
import type { Logger } from "@adobe/ccweb-add-on-core";
|
|
25
|
+
import { PackageJson, TemplateJson } from "@adobe/ccweb-add-on-core";
|
|
26
|
+
import "reflect-metadata";
|
|
27
|
+
import type { ScaffolderOptions } from "../models/ScaffolderOptions.js";
|
|
28
|
+
import type { AddOnBuilder } from "./AddOnBuilder.js";
|
|
29
|
+
/**
|
|
30
|
+
* App builder implementation class for constructing the Add-on project.
|
|
31
|
+
*/
|
|
32
|
+
export declare class TemplateAddOnBuilder implements AddOnBuilder {
|
|
33
|
+
private readonly _logger;
|
|
34
|
+
private _options;
|
|
35
|
+
private _require;
|
|
36
|
+
private _templateRootDirectory;
|
|
37
|
+
private _gitignoreExists;
|
|
38
|
+
private _readmeExists;
|
|
39
|
+
/**
|
|
40
|
+
* Instantiate {@link TemplateAddOnBuilder}.
|
|
41
|
+
*
|
|
42
|
+
* @param options - {@link ScaffolderOptions}.
|
|
43
|
+
* @param logger - {@link Logger} reference.
|
|
44
|
+
* @returns Reference to a new {@link TemplateAddOnBuilder} instance.
|
|
45
|
+
*/
|
|
46
|
+
constructor(options: ScaffolderOptions, logger: Logger);
|
|
47
|
+
/**
|
|
48
|
+
* Get {@link PackageJson}.
|
|
49
|
+
*
|
|
50
|
+
* @returns Reference of {@link PackageJson}.
|
|
51
|
+
*/
|
|
52
|
+
getPackageJson(): PackageJson;
|
|
53
|
+
/**
|
|
54
|
+
* Get {@link TemplateJson}.
|
|
55
|
+
*
|
|
56
|
+
* @returns Reference of {@link TemplateJson}.
|
|
57
|
+
*/
|
|
58
|
+
getTemplateJson(): TemplateJson;
|
|
59
|
+
/**
|
|
60
|
+
* Get template devDependencies.
|
|
61
|
+
*
|
|
62
|
+
* @param template - {@link TemplateJson}
|
|
63
|
+
* @returns Set of template devDependencies.
|
|
64
|
+
*/
|
|
65
|
+
getDevDependenciesToInstall(template: TemplateJson): Set<string>;
|
|
66
|
+
/**
|
|
67
|
+
* Get template dependencies.
|
|
68
|
+
*
|
|
69
|
+
* @param template - {@link TemplateJson}
|
|
70
|
+
* @returns Set of template dependencies.
|
|
71
|
+
*/
|
|
72
|
+
getDependenciesToInstall(template: TemplateJson): Set<string>;
|
|
73
|
+
/**
|
|
74
|
+
* Build the Add-on.
|
|
75
|
+
*
|
|
76
|
+
* @param packageJson - {@link PackageJson}
|
|
77
|
+
*/
|
|
78
|
+
build(packageJson: string): void;
|
|
79
|
+
/**
|
|
80
|
+
* Display success message.
|
|
81
|
+
*/
|
|
82
|
+
displaySuccess(): void;
|
|
83
|
+
private _updateReadMe;
|
|
84
|
+
private _copyTemplateFiles;
|
|
85
|
+
private _updateGitIgnore;
|
|
86
|
+
private _updateManifest;
|
|
87
|
+
private _getAddOnName;
|
|
88
|
+
private _removeTemplateTempFiles;
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=TemplateAddOnBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TemplateAddOnBuilder.d.ts","sourceRoot":"","sources":["../../src/app/TemplateAddOnBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;kFAsBkF;AAElF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAIH,WAAW,EACX,YAAY,EAGf,MAAM,0BAA0B,CAAC;AAQlC,OAAO,kBAAkB,CAAC;AAI1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD;;GAEG;AACH,qBACa,oBAAqB,YAAW,YAAY;IACrD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IAEjC,OAAO,CAAC,QAAQ,CAAqB;IACrC,OAAO,CAAC,QAAQ,CAAe;IAC/B,OAAO,CAAC,sBAAsB,CAAU;IAExC,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,aAAa,CAAS;IAE9B;;;;;;OAMG;gBACS,OAAO,EAAE,iBAAiB,EAA6B,MAAM,EAAE,MAAM;IAQjF;;;;OAIG;IACH,cAAc,IAAI,WAAW;IAK7B;;;;OAIG;IACH,eAAe,IAAI,YAAY;IAO/B;;;;;OAKG;IACH,2BAA2B,CAAC,QAAQ,EAAE,YAAY,GAAG,GAAG,CAAC,MAAM,CAAC;IAWhE;;;;;OAKG;IACH,wBAAwB,CAAC,QAAQ,EAAE,YAAY,GAAG,GAAG,CAAC,MAAM,CAAC;IAW7D;;;;OAIG;IACH,KAAK,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAUhC;;OAEG;IACH,cAAc,IAAI,IAAI;IA8CtB,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,kBAAkB;IAU1B,OAAO,CAAC,gBAAgB;IAcxB,OAAO,CAAC,eAAe;IA4DvB,OAAO,CAAC,aAAa;IAMrB,OAAO,CAAC,wBAAwB;CAGnC"}
|