@antelopejs/core 0.0.1
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/LICENSE +190 -0
- package/README.md +52 -0
- package/dist/cli/common.d.ts +21 -0
- package/dist/cli/common.js +86 -0
- package/dist/cli/common.js.map +1 -0
- package/dist/cli/config/get.d.ts +2 -0
- package/dist/cli/config/get.js +36 -0
- package/dist/cli/config/get.js.map +1 -0
- package/dist/cli/config/index.d.ts +2 -0
- package/dist/cli/config/index.js +20 -0
- package/dist/cli/config/index.js.map +1 -0
- package/dist/cli/config/reset.d.ts +2 -0
- package/dist/cli/config/reset.js +88 -0
- package/dist/cli/config/reset.js.map +1 -0
- package/dist/cli/config/set.d.ts +2 -0
- package/dist/cli/config/set.js +46 -0
- package/dist/cli/config/set.js.map +1 -0
- package/dist/cli/config/show.d.ts +2 -0
- package/dist/cli/config/show.js +27 -0
- package/dist/cli/config/show.js.map +1 -0
- package/dist/cli/git.d.ts +49 -0
- package/dist/cli/git.js +248 -0
- package/dist/cli/git.js.map +1 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +61 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/module/exports/generate.d.ts +2 -0
- package/dist/cli/module/exports/generate.js +178 -0
- package/dist/cli/module/exports/generate.js.map +1 -0
- package/dist/cli/module/exports/index.d.ts +2 -0
- package/dist/cli/module/exports/index.js +16 -0
- package/dist/cli/module/exports/index.js.map +1 -0
- package/dist/cli/module/exports/set.d.ts +2 -0
- package/dist/cli/module/exports/set.js +43 -0
- package/dist/cli/module/exports/set.js.map +1 -0
- package/dist/cli/module/imports/add.d.ts +9 -0
- package/dist/cli/module/imports/add.js +127 -0
- package/dist/cli/module/imports/add.js.map +1 -0
- package/dist/cli/module/imports/index.d.ts +2 -0
- package/dist/cli/module/imports/index.js +20 -0
- package/dist/cli/module/imports/index.js.map +1 -0
- package/dist/cli/module/imports/list.d.ts +2 -0
- package/dist/cli/module/imports/list.js +89 -0
- package/dist/cli/module/imports/list.js.map +1 -0
- package/dist/cli/module/imports/remove.d.ts +2 -0
- package/dist/cli/module/imports/remove.js +97 -0
- package/dist/cli/module/imports/remove.js.map +1 -0
- package/dist/cli/module/imports/update.d.ts +2 -0
- package/dist/cli/module/imports/update.js +157 -0
- package/dist/cli/module/imports/update.js.map +1 -0
- package/dist/cli/module/index.d.ts +2 -0
- package/dist/cli/module/index.js +20 -0
- package/dist/cli/module/index.js.map +1 -0
- package/dist/cli/module/init.d.ts +7 -0
- package/dist/cli/module/init.js +120 -0
- package/dist/cli/module/init.js.map +1 -0
- package/dist/cli/module/test.d.ts +3 -0
- package/dist/cli/module/test.js +33 -0
- package/dist/cli/module/test.js.map +1 -0
- package/dist/cli/project/index.d.ts +2 -0
- package/dist/cli/project/index.js +20 -0
- package/dist/cli/project/index.js.map +1 -0
- package/dist/cli/project/init.d.ts +2 -0
- package/dist/cli/project/init.js +122 -0
- package/dist/cli/project/init.js.map +1 -0
- package/dist/cli/project/logging/index.d.ts +2 -0
- package/dist/cli/project/logging/index.js +16 -0
- package/dist/cli/project/logging/index.js.map +1 -0
- package/dist/cli/project/logging/set.d.ts +2 -0
- package/dist/cli/project/logging/set.js +352 -0
- package/dist/cli/project/logging/set.js.map +1 -0
- package/dist/cli/project/logging/show.d.ts +2 -0
- package/dist/cli/project/logging/show.js +92 -0
- package/dist/cli/project/logging/show.js.map +1 -0
- package/dist/cli/project/modules/add.d.ts +11 -0
- package/dist/cli/project/modules/add.js +157 -0
- package/dist/cli/project/modules/add.js.map +1 -0
- package/dist/cli/project/modules/fix.d.ts +2 -0
- package/dist/cli/project/modules/fix.js +201 -0
- package/dist/cli/project/modules/fix.js.map +1 -0
- package/dist/cli/project/modules/index.d.ts +2 -0
- package/dist/cli/project/modules/index.js +20 -0
- package/dist/cli/project/modules/index.js.map +1 -0
- package/dist/cli/project/modules/remove.d.ts +9 -0
- package/dist/cli/project/modules/remove.js +102 -0
- package/dist/cli/project/modules/remove.js.map +1 -0
- package/dist/cli/project/modules/update.d.ts +2 -0
- package/dist/cli/project/modules/update.js +117 -0
- package/dist/cli/project/modules/update.js.map +1 -0
- package/dist/cli/project/run.d.ts +2 -0
- package/dist/cli/project/run.js +107 -0
- package/dist/cli/project/run.js.map +1 -0
- package/dist/common/cache.d.ts +14 -0
- package/dist/common/cache.js +100 -0
- package/dist/common/cache.js.map +1 -0
- package/dist/common/config.d.ts +54 -0
- package/dist/common/config.js +160 -0
- package/dist/common/config.js.map +1 -0
- package/dist/common/downloader/git.d.ts +8 -0
- package/dist/common/downloader/git.js +61 -0
- package/dist/common/downloader/git.js.map +1 -0
- package/dist/common/downloader/index.d.ts +10 -0
- package/dist/common/downloader/index.js +57 -0
- package/dist/common/downloader/index.js.map +1 -0
- package/dist/common/downloader/local.d.ts +11 -0
- package/dist/common/downloader/local.js +58 -0
- package/dist/common/downloader/local.js.map +1 -0
- package/dist/common/downloader/package.d.ts +6 -0
- package/dist/common/downloader/package.js +53 -0
- package/dist/common/downloader/package.js.map +1 -0
- package/dist/common/manifest.d.ts +45 -0
- package/dist/common/manifest.js +116 -0
- package/dist/common/manifest.js.map +1 -0
- package/dist/eslint.config.d.mts +2 -0
- package/dist/eslint.config.mjs +85 -0
- package/dist/eslint.config.mjs.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +118 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces/core/1/decorators.d.ts +29 -0
- package/dist/interfaces/core/1/decorators.js +72 -0
- package/dist/interfaces/core/1/decorators.js.map +1 -0
- package/dist/interfaces/core/1/index.d.ts +54 -0
- package/dist/interfaces/core/1/index.js +237 -0
- package/dist/interfaces/core/1/index.js.map +1 -0
- package/dist/interfaces/core/1/modules.d.ts +26 -0
- package/dist/interfaces/core/1/modules.js +31 -0
- package/dist/interfaces/core/1/modules.js.map +1 -0
- package/dist/interfaces/core/beta/decorators.d.ts +29 -0
- package/dist/interfaces/core/beta/decorators.js +72 -0
- package/dist/interfaces/core/beta/decorators.js.map +1 -0
- package/dist/interfaces/core/beta/index.d.ts +54 -0
- package/dist/interfaces/core/beta/index.js +237 -0
- package/dist/interfaces/core/beta/index.js.map +1 -0
- package/dist/interfaces/core/beta/modules.d.ts +26 -0
- package/dist/interfaces/core/beta/modules.js +31 -0
- package/dist/interfaces/core/beta/modules.js.map +1 -0
- package/dist/interfaces/logging/1/index.d.ts +16 -0
- package/dist/interfaces/logging/1/index.js +49 -0
- package/dist/interfaces/logging/1/index.js.map +1 -0
- package/dist/interfaces/logging/1/listener.d.ts +9 -0
- package/dist/interfaces/logging/1/listener.js +5 -0
- package/dist/interfaces/logging/1/listener.js.map +1 -0
- package/dist/interfaces/logging/beta/index.d.ts +16 -0
- package/dist/interfaces/logging/beta/index.js +49 -0
- package/dist/interfaces/logging/beta/index.js.map +1 -0
- package/dist/interfaces/logging/beta/listener.d.ts +9 -0
- package/dist/interfaces/logging/beta/listener.js +5 -0
- package/dist/interfaces/logging/beta/listener.js.map +1 -0
- package/dist/loader/index.d.ts +45 -0
- package/dist/loader/index.js +472 -0
- package/dist/loader/index.js.map +1 -0
- package/dist/loader/module.d.ts +29 -0
- package/dist/loader/module.js +142 -0
- package/dist/loader/module.js.map +1 -0
- package/dist/logging/index.d.ts +5 -0
- package/dist/logging/index.js +124 -0
- package/dist/logging/index.js.map +1 -0
- package/dist/src/cli/common.d.ts +18 -0
- package/dist/src/cli/common.js +105 -0
- package/dist/src/cli/common.js.map +1 -0
- package/dist/src/cli/config/get.d.ts +2 -0
- package/dist/src/cli/config/get.js +36 -0
- package/dist/src/cli/config/get.js.map +1 -0
- package/dist/src/cli/config/index.d.ts +2 -0
- package/dist/src/cli/config/index.js +20 -0
- package/dist/src/cli/config/index.js.map +1 -0
- package/dist/src/cli/config/reset.d.ts +2 -0
- package/dist/src/cli/config/reset.js +88 -0
- package/dist/src/cli/config/reset.js.map +1 -0
- package/dist/src/cli/config/set.d.ts +2 -0
- package/dist/src/cli/config/set.js +42 -0
- package/dist/src/cli/config/set.js.map +1 -0
- package/dist/src/cli/config/show.d.ts +2 -0
- package/dist/src/cli/config/show.js +27 -0
- package/dist/src/cli/config/show.js.map +1 -0
- package/dist/src/cli/git.d.ts +43 -0
- package/dist/src/cli/git.js +227 -0
- package/dist/src/cli/git.js.map +1 -0
- package/dist/src/cli/index.d.ts +2 -0
- package/dist/src/cli/index.js +43 -0
- package/dist/src/cli/index.js.map +1 -0
- package/dist/src/cli/module/exports/generate.d.ts +2 -0
- package/dist/src/cli/module/exports/generate.js +71 -0
- package/dist/src/cli/module/exports/generate.js.map +1 -0
- package/dist/src/cli/module/exports/index.d.ts +2 -0
- package/dist/src/cli/module/exports/index.js +16 -0
- package/dist/src/cli/module/exports/index.js.map +1 -0
- package/dist/src/cli/module/exports/set.d.ts +2 -0
- package/dist/src/cli/module/exports/set.js +43 -0
- package/dist/src/cli/module/exports/set.js.map +1 -0
- package/dist/src/cli/module/imports/add.d.ts +9 -0
- package/dist/src/cli/module/imports/add.js +98 -0
- package/dist/src/cli/module/imports/add.js.map +1 -0
- package/dist/src/cli/module/imports/index.d.ts +2 -0
- package/dist/src/cli/module/imports/index.js +20 -0
- package/dist/src/cli/module/imports/index.js.map +1 -0
- package/dist/src/cli/module/imports/list.d.ts +2 -0
- package/dist/src/cli/module/imports/list.js +89 -0
- package/dist/src/cli/module/imports/list.js.map +1 -0
- package/dist/src/cli/module/imports/remove.d.ts +2 -0
- package/dist/src/cli/module/imports/remove.js +97 -0
- package/dist/src/cli/module/imports/remove.js.map +1 -0
- package/dist/src/cli/module/imports/update.d.ts +2 -0
- package/dist/src/cli/module/imports/update.js +129 -0
- package/dist/src/cli/module/imports/update.js.map +1 -0
- package/dist/src/cli/module/index.d.ts +2 -0
- package/dist/src/cli/module/index.js +20 -0
- package/dist/src/cli/module/index.js.map +1 -0
- package/dist/src/cli/module/init.d.ts +7 -0
- package/dist/src/cli/module/init.js +136 -0
- package/dist/src/cli/module/init.js.map +1 -0
- package/dist/src/cli/module/test.d.ts +6 -0
- package/dist/src/cli/module/test.js +20 -0
- package/dist/src/cli/module/test.js.map +1 -0
- package/dist/src/cli/project/index.d.ts +2 -0
- package/dist/src/cli/project/index.js +20 -0
- package/dist/src/cli/project/index.js.map +1 -0
- package/dist/src/cli/project/init.d.ts +2 -0
- package/dist/src/cli/project/init.js +116 -0
- package/dist/src/cli/project/init.js.map +1 -0
- package/dist/src/cli/project/logging/index.d.ts +2 -0
- package/dist/src/cli/project/logging/index.js +16 -0
- package/dist/src/cli/project/logging/index.js.map +1 -0
- package/dist/src/cli/project/logging/set.d.ts +2 -0
- package/dist/src/cli/project/logging/set.js +353 -0
- package/dist/src/cli/project/logging/set.js.map +1 -0
- package/dist/src/cli/project/logging/show.d.ts +2 -0
- package/dist/src/cli/project/logging/show.js +93 -0
- package/dist/src/cli/project/logging/show.js.map +1 -0
- package/dist/src/cli/project/modules/add.d.ts +11 -0
- package/dist/src/cli/project/modules/add.js +161 -0
- package/dist/src/cli/project/modules/add.js.map +1 -0
- package/dist/src/cli/project/modules/fix.d.ts +2 -0
- package/dist/src/cli/project/modules/fix.js +224 -0
- package/dist/src/cli/project/modules/fix.js.map +1 -0
- package/dist/src/cli/project/modules/index.d.ts +2 -0
- package/dist/src/cli/project/modules/index.js +20 -0
- package/dist/src/cli/project/modules/index.js.map +1 -0
- package/dist/src/cli/project/modules/remove.d.ts +9 -0
- package/dist/src/cli/project/modules/remove.js +102 -0
- package/dist/src/cli/project/modules/remove.js.map +1 -0
- package/dist/src/cli/project/modules/update.d.ts +2 -0
- package/dist/src/cli/project/modules/update.js +117 -0
- package/dist/src/cli/project/modules/update.js.map +1 -0
- package/dist/src/cli/project/run.d.ts +2 -0
- package/dist/src/cli/project/run.js +60 -0
- package/dist/src/cli/project/run.js.map +1 -0
- package/dist/src/common/cache.d.ts +14 -0
- package/dist/src/common/cache.js +99 -0
- package/dist/src/common/cache.js.map +1 -0
- package/dist/src/common/config.d.ts +58 -0
- package/dist/src/common/config.js +159 -0
- package/dist/src/common/config.js.map +1 -0
- package/dist/src/common/downloader/git.d.ts +8 -0
- package/dist/src/common/downloader/git.js +64 -0
- package/dist/src/common/downloader/git.js.map +1 -0
- package/dist/src/common/downloader/index.d.ts +10 -0
- package/dist/src/common/downloader/index.js +50 -0
- package/dist/src/common/downloader/index.js.map +1 -0
- package/dist/src/common/downloader/local.d.ts +11 -0
- package/dist/src/common/downloader/local.js +39 -0
- package/dist/src/common/downloader/local.js.map +1 -0
- package/dist/src/common/downloader/package.d.ts +6 -0
- package/dist/src/common/downloader/package.js +79 -0
- package/dist/src/common/downloader/package.js.map +1 -0
- package/dist/src/common/manifest.d.ts +45 -0
- package/dist/src/common/manifest.js +114 -0
- package/dist/src/common/manifest.js.map +1 -0
- package/dist/src/index.d.ts +5 -0
- package/dist/src/index.js +117 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/interfaces/core/1/decorators.d.ts +29 -0
- package/dist/src/interfaces/core/1/decorators.js +72 -0
- package/dist/src/interfaces/core/1/decorators.js.map +1 -0
- package/dist/src/interfaces/core/1/index.d.ts +54 -0
- package/dist/src/interfaces/core/1/index.js +237 -0
- package/dist/src/interfaces/core/1/index.js.map +1 -0
- package/dist/src/interfaces/core/1/modules.d.ts +26 -0
- package/dist/src/interfaces/core/1/modules.js +31 -0
- package/dist/src/interfaces/core/1/modules.js.map +1 -0
- package/dist/src/interfaces/logging/1/index.d.ts +16 -0
- package/dist/src/interfaces/logging/1/index.js +49 -0
- package/dist/src/interfaces/logging/1/index.js.map +1 -0
- package/dist/src/interfaces/logging/1/listener.d.ts +9 -0
- package/dist/src/interfaces/logging/1/listener.js +5 -0
- package/dist/src/interfaces/logging/1/listener.js.map +1 -0
- package/dist/src/loader/index.d.ts +42 -0
- package/dist/src/loader/index.js +428 -0
- package/dist/src/loader/index.js.map +1 -0
- package/dist/src/loader/module.d.ts +29 -0
- package/dist/src/loader/module.js +139 -0
- package/dist/src/loader/module.js.map +1 -0
- package/dist/src/logging/index.d.ts +5 -0
- package/dist/src/logging/index.js +118 -0
- package/dist/src/logging/index.js.map +1 -0
- package/dist/src/utils/cli-ui.d.ts +34 -0
- package/dist/src/utils/cli-ui.js +173 -0
- package/dist/src/utils/cli-ui.js.map +1 -0
- package/dist/src/utils/command.d.ts +3 -0
- package/dist/src/utils/command.js +33 -0
- package/dist/src/utils/command.js.map +1 -0
- package/dist/src/utils/object.d.ts +2 -0
- package/dist/src/utils/object.js +26 -0
- package/dist/src/utils/object.js.map +1 -0
- package/dist/src/utils/promise.d.ts +3 -0
- package/dist/src/utils/promise.js +24 -0
- package/dist/src/utils/promise.js.map +1 -0
- package/dist/utils/antelope-runner.d.ts +1 -0
- package/dist/utils/antelope-runner.js +29 -0
- package/dist/utils/antelope-runner.js.map +1 -0
- package/dist/utils/cli-ui.d.ts +34 -0
- package/dist/utils/cli-ui.js +173 -0
- package/dist/utils/cli-ui.js.map +1 -0
- package/dist/utils/command.d.ts +2 -0
- package/dist/utils/command.js +19 -0
- package/dist/utils/command.js.map +1 -0
- package/dist/utils/logger.d.ts +5 -0
- package/dist/utils/logger.js +14 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/object.d.ts +2 -0
- package/dist/utils/object.js +26 -0
- package/dist/utils/object.js.map +1 -0
- package/dist/utils/package-manager.d.ts +3 -0
- package/dist/utils/package-manager.js +39 -0
- package/dist/utils/package-manager.js.map +1 -0
- package/dist/utils/promise.d.ts +3 -0
- package/dist/utils/promise.js +24 -0
- package/dist/utils/promise.js.map +1 -0
- package/package.json +77 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
Copyright (c) 2025-present - AntelopeJS Team
|
|
179
|
+
|
|
180
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
|
+
you may not use this file except in compliance with the License.
|
|
182
|
+
You may obtain a copy of the License at
|
|
183
|
+
|
|
184
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
+
|
|
186
|
+
Unless required by applicable law or agreed to in writing, software
|
|
187
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
188
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
189
|
+
See the License for the specific language governing permissions and
|
|
190
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
# AntelopeJS
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@antelopejs/core)
|
|
6
|
+
[](https://opensource.org/licenses/Apache-2.0)
|
|
7
|
+
[](https://www.typescriptlang.org/)
|
|
8
|
+
|
|
9
|
+
AntelopeJS is a production-ready TypeScript framework designed for developing high-performance, robust, and scalable Node.js applications. Its innovative interface-based architecture enables developers to create modular, extensible applications with clear separation of concerns.
|
|
10
|
+
|
|
11
|
+
## Philosophy
|
|
12
|
+
|
|
13
|
+
AntelopeJS addresses common framework challenges through its unique approach:
|
|
14
|
+
|
|
15
|
+
- **Minimal Core**: Unlike frameworks that implement too many features at the core level, AntelopeJS keeps its core minimal and unopinionated, delegating functionality to modules
|
|
16
|
+
- **Interface-Based Design**: Clean separation between modules through well-defined interface contracts
|
|
17
|
+
- **Seamless Upgrades**: Run multiple versions of the same interface side-by-side, allowing gradual upgrades without breaking changes
|
|
18
|
+
- **Modular Architecture**: Build applications with independent, swappable components
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Install globally
|
|
24
|
+
npm install -g @antelopejs/core
|
|
25
|
+
|
|
26
|
+
# Install in a project
|
|
27
|
+
npm install @antelopejs/core
|
|
28
|
+
# or using yarn
|
|
29
|
+
yarn add @antelopejs/core
|
|
30
|
+
# or using pnpm
|
|
31
|
+
pnpm add @antelopejs/core
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Getting Started
|
|
35
|
+
|
|
36
|
+
To create a new project with the CLI:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# Using npx
|
|
40
|
+
npx @antelopejs/core project init <project-name>
|
|
41
|
+
|
|
42
|
+
# Or if installed globally
|
|
43
|
+
ajs project init <project-name>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Documentation
|
|
47
|
+
|
|
48
|
+
For complete documentation, visit [AntelopeJS](https://antelopejs.com/)
|
|
49
|
+
|
|
50
|
+
## License
|
|
51
|
+
|
|
52
|
+
Apache-2.0
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Option } from 'commander';
|
|
2
|
+
import { AntelopeConfig } from '../common/config';
|
|
3
|
+
import { ModulePackageJson } from '../common/manifest';
|
|
4
|
+
export declare const DEFAULT_GIT_REPO = "git@github.com:AntelopeJS/interfaces.git";
|
|
5
|
+
export declare function displayNonDefaultGitWarning(gitUrl: string): Promise<void>;
|
|
6
|
+
export declare namespace Options {
|
|
7
|
+
const project: Option;
|
|
8
|
+
const module: Option;
|
|
9
|
+
const git: Option;
|
|
10
|
+
}
|
|
11
|
+
export declare function writeConfig(project: string, data: Partial<AntelopeConfig>): Promise<void>;
|
|
12
|
+
export declare function readConfig(project: string): Promise<AntelopeConfig | undefined>;
|
|
13
|
+
export declare function writeModuleManifest(module: string, data: ModulePackageJson): Promise<void>;
|
|
14
|
+
export declare function readModuleManifest(module: string): Promise<ModulePackageJson | undefined>;
|
|
15
|
+
export interface UserConfig {
|
|
16
|
+
git: string;
|
|
17
|
+
packageManager: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function getDefaultUserConfig(): UserConfig;
|
|
20
|
+
export declare function writeUserConfig(data: UserConfig): Promise<void>;
|
|
21
|
+
export declare function readUserConfig(): Promise<UserConfig>;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Options = exports.DEFAULT_GIT_REPO = void 0;
|
|
7
|
+
exports.displayNonDefaultGitWarning = displayNonDefaultGitWarning;
|
|
8
|
+
exports.writeConfig = writeConfig;
|
|
9
|
+
exports.readConfig = readConfig;
|
|
10
|
+
exports.writeModuleManifest = writeModuleManifest;
|
|
11
|
+
exports.readModuleManifest = readModuleManifest;
|
|
12
|
+
exports.getDefaultUserConfig = getDefaultUserConfig;
|
|
13
|
+
exports.writeUserConfig = writeUserConfig;
|
|
14
|
+
exports.readUserConfig = readUserConfig;
|
|
15
|
+
const commander_1 = require("commander");
|
|
16
|
+
const promises_1 = require("fs/promises");
|
|
17
|
+
const path_1 = __importDefault(require("path"));
|
|
18
|
+
const os_1 = require("os");
|
|
19
|
+
const fs_1 = require("fs");
|
|
20
|
+
const cli_ui_1 = require("../utils/cli-ui");
|
|
21
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
22
|
+
exports.DEFAULT_GIT_REPO = 'git@github.com:AntelopeJS/interfaces.git';
|
|
23
|
+
async function displayNonDefaultGitWarning(gitUrl) {
|
|
24
|
+
if (gitUrl !== exports.DEFAULT_GIT_REPO) {
|
|
25
|
+
console.log(chalk_1.default.yellow.bold('⚠️ WARNING: Using non-default git repository ⚠️'));
|
|
26
|
+
(0, cli_ui_1.warning)('You are using a non-official git repository for interfaces. These interfaces may not adhere to community quality standards or best practices.');
|
|
27
|
+
await new Promise((resolve) => setTimeout(resolve, 3000));
|
|
28
|
+
console.log('');
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
var Options;
|
|
32
|
+
(function (Options) {
|
|
33
|
+
Options.project = new commander_1.Option('-p, --project <path>', 'Path to AntelopeJS project')
|
|
34
|
+
.default(path_1.default.resolve(process.cwd()))
|
|
35
|
+
.env('ANTELOPEJS_PROJECT')
|
|
36
|
+
.argParser((val) => path_1.default.resolve(val));
|
|
37
|
+
Options.module = new commander_1.Option('-m, --module <path>', 'Path to AntelopeJS module')
|
|
38
|
+
.default(path_1.default.resolve(process.cwd()))
|
|
39
|
+
.env('ANTELOPEJS_MODULE')
|
|
40
|
+
.argParser((val) => path_1.default.resolve(val));
|
|
41
|
+
Options.git = new commander_1.Option('-g, --git <url>', 'URL to git interfaces').env('ANTELOPEJS_GIT');
|
|
42
|
+
})(Options || (exports.Options = Options = {}));
|
|
43
|
+
async function writeConfig(project, data) {
|
|
44
|
+
const configPath = path_1.default.join(project, 'antelope.json');
|
|
45
|
+
await (0, promises_1.writeFile)(configPath, JSON.stringify(data, null, '\t'));
|
|
46
|
+
}
|
|
47
|
+
async function readConfig(project) {
|
|
48
|
+
const configPath = path_1.default.join(project, 'antelope.json');
|
|
49
|
+
if (!(await (0, promises_1.stat)(configPath).catch((err) => (err.code !== 'ENOENT' ? Promise.reject(err) : false)))) {
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
52
|
+
return JSON.parse((await (0, promises_1.readFile)(configPath)).toString());
|
|
53
|
+
}
|
|
54
|
+
async function writeModuleManifest(module, data) {
|
|
55
|
+
const configPath = path_1.default.join(module, 'package.json');
|
|
56
|
+
await (0, promises_1.writeFile)(configPath, JSON.stringify(data, null, '\t'));
|
|
57
|
+
}
|
|
58
|
+
async function readModuleManifest(module) {
|
|
59
|
+
const configPath = path_1.default.join(module, 'package.json');
|
|
60
|
+
if (!(await (0, promises_1.stat)(configPath).catch((err) => (err.code !== 'ENOENT' ? Promise.reject(err) : false)))) {
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
return JSON.parse((await (0, promises_1.readFile)(configPath)).toString());
|
|
64
|
+
}
|
|
65
|
+
function getDefaultUserConfig() {
|
|
66
|
+
return {
|
|
67
|
+
git: exports.DEFAULT_GIT_REPO,
|
|
68
|
+
packageManager: 'pnpm',
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
async function writeUserConfig(data) {
|
|
72
|
+
const folderPath = path_1.default.join((0, os_1.homedir)(), '.antelopejs');
|
|
73
|
+
const configPath = path_1.default.join(folderPath, 'config.json');
|
|
74
|
+
if (!(await (0, promises_1.stat)(folderPath).catch(() => false))) {
|
|
75
|
+
(0, fs_1.mkdirSync)(folderPath, { recursive: true });
|
|
76
|
+
}
|
|
77
|
+
await (0, promises_1.writeFile)(configPath, JSON.stringify(data, null, '\t'));
|
|
78
|
+
}
|
|
79
|
+
async function readUserConfig() {
|
|
80
|
+
const configPath = path_1.default.join((0, os_1.homedir)(), '.antelopejs', 'config.json');
|
|
81
|
+
if (!(await (0, promises_1.stat)(configPath).catch(() => false))) {
|
|
82
|
+
return getDefaultUserConfig();
|
|
83
|
+
}
|
|
84
|
+
return JSON.parse((await (0, promises_1.readFile)(configPath)).toString());
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=common.js.map
|
|
@@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IAAI,CAAC,CAAC,CAAC;AAChE,CAAC;AAEM,KAAK,UAAU,cAAc;IAClC,MAAM,UAAU,GAAG,cAAI,CAAC,IAAI,CAAC,IAAA,YAAO,GAAE,EAAE,aAAa,EAAE,aAAa,CAAC,CAAC;IACtE,IAAI,CAAC,CAAC,MAAM,IAAA,eAAI,EAAC,UAAU,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;QACjD,OAAO,oBAAoB,EAAE,CAAC;IAChC,CAAC;IACD,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,IAAA,mBAAQ,EAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC7D,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = default_1;
|
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
const commander_1 = require("commander");
|
|
9
|
+
const common_1 = require("../common");
|
|
10
|
+
const cli_ui_1 = require("../../utils/cli-ui");
|
|
11
|
+
const VALID_KEYS = ['git', 'packageManager'];
|
|
12
|
+
function default_1() {
|
|
13
|
+
return new commander_1.Command('get')
|
|
14
|
+
.description(`Get a specific CLI configuration value\n` + `Retrieves the value of a single configuration setting.`)
|
|
15
|
+
.argument('<key>', `Setting name to retrieve (${VALID_KEYS.join(', ')})`)
|
|
16
|
+
.action(async (key) => {
|
|
17
|
+
console.log('');
|
|
18
|
+
const config = await (0, common_1.readUserConfig)();
|
|
19
|
+
if (!VALID_KEYS.includes(key)) {
|
|
20
|
+
(0, cli_ui_1.error)(`Invalid configuration key: ${chalk_1.default.bold(key)}`);
|
|
21
|
+
console.log(`Valid keys are: ${VALID_KEYS.map((k) => chalk_1.default.cyan(k)).join(', ')}`);
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
if (key in config) {
|
|
25
|
+
const value = config[key];
|
|
26
|
+
await (0, cli_ui_1.displayBox)((0, cli_ui_1.keyValue)(key, value ? chalk_1.default.green(value) : chalk_1.default.dim('Not set')), '🔍 Configuration Value', {
|
|
27
|
+
padding: 1,
|
|
28
|
+
borderColor: 'yellow',
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
(0, cli_ui_1.error)(`Configuration key not found: ${chalk_1.default.bold(key)}`);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=get.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../src/cli/config/get.ts"],"names":[],"mappings":";;;;;AAOA,4BA6BC;AApCD,kDAA0B;AAC1B,yCAAoC;AACpC,sCAAuD;AACvD,+CAAiE;AAEjE,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;AAE7C;IACE,OAAO,IAAI,mBAAO,CAAC,KAAK,CAAC;SACtB,WAAW,CAAC,0CAA0C,GAAG,wDAAwD,CAAC;SAClH,QAAQ,CAAC,OAAO,EAAE,6BAA6B,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;SACxE,MAAM,CAAC,KAAK,EAAE,GAAW,EAAE,EAAE;QAC5B,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAEhB,MAAM,MAAM,GAAG,MAAM,IAAA,uBAAc,GAAE,CAAC;QAGtC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAC9B,IAAA,cAAK,EAAC,8BAA8B,eAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YACvD,OAAO,CAAC,GAAG,CAAC,mBAAmB,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,eAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAClF,OAAO;QACT,CAAC;QAGD,IAAI,GAAG,IAAI,MAAM,EAAE,CAAC;YAClB,MAAM,KAAK,GAAG,MAAM,CAAC,GAAuB,CAAC,CAAC;YAG9C,MAAM,IAAA,mBAAU,EAAC,IAAA,iBAAQ,EAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,eAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,eAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,wBAAwB,EAAE;gBAC3G,OAAO,EAAE,CAAC;gBACV,WAAW,EAAE,QAAQ;aACtB,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,IAAA,cAAK,EAAC,gCAAgC,eAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC3D,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = default_1;
|
|
7
|
+
const commander_1 = require("commander");
|
|
8
|
+
const show_1 = __importDefault(require("./show"));
|
|
9
|
+
const get_1 = __importDefault(require("./get"));
|
|
10
|
+
const set_1 = __importDefault(require("./set"));
|
|
11
|
+
const reset_1 = __importDefault(require("./reset"));
|
|
12
|
+
function default_1() {
|
|
13
|
+
return new commander_1.Command('config')
|
|
14
|
+
.description(`Manage CLI Configuration\n` + `View and change settings for the AntelopeJS CLI.`)
|
|
15
|
+
.addCommand((0, show_1.default)())
|
|
16
|
+
.addCommand((0, get_1.default)())
|
|
17
|
+
.addCommand((0, set_1.default)())
|
|
18
|
+
.addCommand((0, reset_1.default)());
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/config/index.ts"],"names":[],"mappings":";;;;;AAOA,4BAOC;AAdD,yCAAoC;AAEpC,kDAA6B;AAC7B,gDAA2B;AAC3B,gDAA2B;AAC3B,oDAA+B;AAE/B;IACE,OAAO,IAAI,mBAAO,CAAC,QAAQ,CAAC;SACzB,WAAW,CAAC,4BAA4B,GAAG,kDAAkD,CAAC;SAC9F,UAAU,CAAC,IAAA,cAAO,GAAE,CAAC;SACrB,UAAU,CAAC,IAAA,aAAM,GAAE,CAAC;SACpB,UAAU,CAAC,IAAA,aAAM,GAAE,CAAC;SACpB,UAAU,CAAC,IAAA,eAAQ,GAAE,CAAC,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.default = default_1;
|
|
40
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
41
|
+
const commander_1 = require("commander");
|
|
42
|
+
const common_1 = require("../common");
|
|
43
|
+
const cli_ui_1 = require("../../utils/cli-ui");
|
|
44
|
+
function default_1() {
|
|
45
|
+
return new commander_1.Command('reset')
|
|
46
|
+
.description(`Reset CLI configuration to default values\n` + `Restores all configuration settings to their original defaults.`)
|
|
47
|
+
.option('-y, --yes', 'Skip confirmation prompt')
|
|
48
|
+
.action(async (options) => {
|
|
49
|
+
console.log('');
|
|
50
|
+
const currentConfig = await (0, common_1.readUserConfig)();
|
|
51
|
+
const defaultConfig = (0, common_1.getDefaultUserConfig)();
|
|
52
|
+
const hasChanges = Object.entries(defaultConfig).some(([key, value]) => currentConfig[key] !== value);
|
|
53
|
+
if (!hasChanges) {
|
|
54
|
+
console.log(chalk_1.default.blue(`ℹ Configuration is already at default values.`));
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
if (!options.yes) {
|
|
58
|
+
const inquirer = (await Promise.resolve().then(() => __importStar(require('inquirer')))).default;
|
|
59
|
+
const { confirm } = await inquirer.prompt([
|
|
60
|
+
{
|
|
61
|
+
type: 'confirm',
|
|
62
|
+
name: 'confirm',
|
|
63
|
+
message: 'This will reset all configuration settings to their default values. Continue?',
|
|
64
|
+
default: false,
|
|
65
|
+
},
|
|
66
|
+
]);
|
|
67
|
+
if (!confirm) {
|
|
68
|
+
console.log(chalk_1.default.yellow(`⚠ Reset cancelled.`));
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
const comparisonItems = Object.entries(defaultConfig)
|
|
73
|
+
.map(([key, defaultValue]) => {
|
|
74
|
+
const currentValue = currentConfig[key];
|
|
75
|
+
return (`${(0, cli_ui_1.keyValue)('Setting', chalk_1.default.cyan(key))}\n` +
|
|
76
|
+
`${(0, cli_ui_1.keyValue)('Current', chalk_1.default.dim(currentValue || 'Not set'))}\n` +
|
|
77
|
+
`${(0, cli_ui_1.keyValue)('Default', chalk_1.default.green(defaultValue))}`);
|
|
78
|
+
})
|
|
79
|
+
.join('\n\n');
|
|
80
|
+
await (0, common_1.writeUserConfig)(defaultConfig);
|
|
81
|
+
(0, cli_ui_1.success)(`Configuration reset to default values`);
|
|
82
|
+
await (0, cli_ui_1.displayBox)(comparisonItems, '✓ Configuration Reset', {
|
|
83
|
+
borderColor: 'green',
|
|
84
|
+
padding: 1,
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=reset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reset.js","sourceRoot":"","sources":["../../../src/cli/config/reset.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,4BAmEC;AAxED,kDAA0B;AAC1B,yCAAoC;AACpC,sCAAkF;AAClF,+CAAmE;AAEnE;IACE,OA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AY,CAAC,EAAE,EAAE;YAC3B,MAAM,YAAY,GAAG,aAAa,CAAC,GAAiC,CAAC,CAAC;YACtE,OAAO,CACL,GAAG,IAAA,iBAAQ,EAAC,SAAS,EAAE,eAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI;gBAC3C,GAAG,IAAA,iBAAQ,EAAC,SAAS,EAAE,eAAK,CAAC,GAAG,CAAC,YAAY,IAAI,SAAS,CAAC,CAAC,IAAI;gBAChE,GAAG,IAAA,iBAAQ,EAAC,SAAS,EAAE,eAAK,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,EAAE,CACpD,CAAC;QACJ,CAAC,CAAC;aACD,IAAI,CAAC,MAAM,CAAC,CAAC;QAGhB,MAAM,IAAA,wBAAe,EAAC,aAAa,CAAC,CAAC;QAGrC,IAAA,gBAAO,EAAC,uCAAuC,CAAC,CAAC;QAGjD,MAAM,IAAA,mBAAU,EAAC,eAAe,EAAE,uBAAuB,EAAE;YACzD,WAAW,EAAE,OAAO;YACpB,OAAO,EAAE,CAAC;SACX,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = default_1;
|
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
const commander_1 = require("commander");
|
|
9
|
+
const common_1 = require("../common");
|
|
10
|
+
const cli_ui_1 = require("../../utils/cli-ui");
|
|
11
|
+
const VALID_KEYS = ['git', 'packageManager'];
|
|
12
|
+
const VALID_PACKAGE_MANAGERS = ['npm', 'yarn', 'pnpm'];
|
|
13
|
+
function default_1() {
|
|
14
|
+
return new commander_1.Command('set')
|
|
15
|
+
.description(`Set a CLI configuration value\n` + `Changes a configuration setting to a new value.`)
|
|
16
|
+
.argument('<key>', `Setting name to change (${VALID_KEYS.join(', ')})`)
|
|
17
|
+
.argument('<value>', 'New value to set')
|
|
18
|
+
.action(async (key, value) => {
|
|
19
|
+
console.log('');
|
|
20
|
+
if (!VALID_KEYS.includes(key)) {
|
|
21
|
+
(0, cli_ui_1.error)(`Invalid configuration key: ${chalk_1.default.bold(key)}`);
|
|
22
|
+
console.log(`Valid keys are: ${VALID_KEYS.map((k) => chalk_1.default.cyan(k)).join(', ')}`);
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
if (key === 'packageManager' && !VALID_PACKAGE_MANAGERS.includes(value)) {
|
|
26
|
+
(0, cli_ui_1.error)(`Invalid package manager: ${chalk_1.default.bold(value)}`);
|
|
27
|
+
console.log(`Valid package managers are: ${VALID_PACKAGE_MANAGERS.map((k) => chalk_1.default.cyan(k)).join(', ')}`);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const config = await (0, common_1.readUserConfig)();
|
|
31
|
+
if (key === 'git' && value !== common_1.DEFAULT_GIT_REPO) {
|
|
32
|
+
await (0, common_1.displayNonDefaultGitWarning)(value);
|
|
33
|
+
}
|
|
34
|
+
const oldValue = config[key];
|
|
35
|
+
config[key] = value;
|
|
36
|
+
await (0, common_1.writeUserConfig)(config);
|
|
37
|
+
(0, cli_ui_1.success)(`Configuration updated successfully`);
|
|
38
|
+
await (0, cli_ui_1.displayBox)(`${(0, cli_ui_1.keyValue)('Setting', chalk_1.default.cyan(key))}\n` +
|
|
39
|
+
`${(0, cli_ui_1.keyValue)('Old value', chalk_1.default.dim(oldValue || 'Not set'))}\n` +
|
|
40
|
+
`${(0, cli_ui_1.keyValue)('New value', chalk_1.default.green(value))}`, '✓ Configuration Updated', {
|
|
41
|
+
borderColor: 'green',
|
|
42
|
+
padding: 1,
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=set.js.map
|
|
@@ -0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,sBAAsB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,eAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAC1G,OAAO;QACT,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,IAAA,uBAAc,GAAE,CAAC;QAGtC,IAAI,GAAG,KAAK,KAAK,IAAI,KAAK,KAAK,yBAAgB,EAAE,CAAC;YAChD,MAAM,IAAA,oCAA2B,EAAC,KAAK,CAAC,CAAC;QAC3C,CAAC;QAGD,MAAM,QAAQ,GAAG,MAAM,CAAC,GAA0B,CAAC,CAAC;QAGpD,MAAM,CAAC,GAA0B,CAAC,GAAG,KAAY,CAAC;QAClD,MAAM,IAAA,wBAAe,EAAC,MAAM,CAAC,CAAC;QAG9B,IAAA,gBAAO,EAAC,oCAAoC,CAAC,CAAC;QAG9C,MAAM,IAAA,mBAAU,EACd,GAAG,IAAA,iBAAQ,EAAC,SAAS,EAAE,eAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI;YACzC,GAAG,IAAA,iBAAQ,EAAC,WAAW,EAAE,eAAK,CAAC,GAAG,CAAC,QAAQ,IAAI,SAAS,CAAC,CAAC,IAAI;YAC9D,GAAG,IAAA,iBAAQ,EAAC,WAAW,EAAE,eAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,EAChD,yBAAyB,EACzB;YACE,WAAW,EAAE,OAAO;YACpB,OAAO,EAAE,CAAC;SACX,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = default_1;
|
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
const commander_1 = require("commander");
|
|
9
|
+
const common_1 = require("../common");
|
|
10
|
+
const cli_ui_1 = require("../../utils/cli-ui");
|
|
11
|
+
function default_1() {
|
|
12
|
+
return new commander_1.Command('show').description(`Display all CLI configuration settings`).action(async () => {
|
|
13
|
+
console.log('');
|
|
14
|
+
const config = await (0, common_1.readUserConfig)();
|
|
15
|
+
const configItems = Object.entries(config)
|
|
16
|
+
.map(([key, value]) => (0, cli_ui_1.keyValue)(key, value ? chalk_1.default.green(value) : chalk_1.default.dim('Not set')))
|
|
17
|
+
.join('\n');
|
|
18
|
+
await (0, cli_ui_1.displayBox)(configItems || chalk_1.default.dim('No configuration values set'), '🔧 AntelopeJS CLI Configuration', {
|
|
19
|
+
padding: 1,
|
|
20
|
+
borderColor: 'yellow',
|
|
21
|
+
});
|
|
22
|
+
console.log('');
|
|
23
|
+
console.log(chalk_1.default.dim(`To change a setting, use: ${chalk_1.default.cyan('ajs config set <key> <value>')}`));
|
|
24
|
+
console.log(chalk_1.default.dim(`To reset all settings to defaults, use: ${chalk_1.default.cyan('ajs config reset')}`));
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=show.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"show.js","sourceRoot":"","sources":["../../../src/cli/config/show.ts"],"names":[],"mappings":";;;;;AAKA,4BAsBC;AA3BD,kDAA0B;AAC1B,yCAAoC;AACpC,sCAA2C;AAC3C,+CAA0D;AAE1D;IACE,OAAO,IAAI,mBAAO,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,wCAAwC,CAAC,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE;QACjG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAEhB,MAAM,MAAM,GAAG,MAAM,IAAA,uBAAc,GAAE,CAAC;QAGtC,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;aAC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