stacks 0.37.4 → 0.37.6
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/README.md +7 -2
- package/dist/cli/actions/build.d.ts +7 -0
- package/dist/cli/actions/build.mjs +117 -0
- package/dist/cli/actions/commit.d.ts +1 -0
- package/dist/cli/actions/commit.mjs +8 -0
- package/dist/cli/actions/dev.d.ts +1 -0
- package/dist/cli/actions/dev.mjs +34 -0
- package/dist/cli/actions/examples.d.ts +3 -0
- package/dist/cli/actions/examples.mjs +57 -0
- package/dist/cli/actions/fresh.d.ts +1 -0
- package/dist/cli/actions/fresh.mjs +8 -0
- package/dist/cli/actions/generate.d.ts +7 -0
- package/dist/cli/actions/generate.mjs +117 -0
- package/dist/cli/actions/index.d.ts +12 -0
- package/dist/cli/actions/index.mjs +12 -0
- package/dist/cli/actions/key.d.ts +2 -0
- package/dist/cli/actions/key.mjs +22 -0
- package/dist/cli/actions/lint.d.ts +2 -0
- package/dist/cli/actions/lint.mjs +15 -0
- package/dist/cli/actions/make.d.ts +5 -0
- package/dist/cli/actions/make.mjs +97 -0
- package/dist/cli/actions/release.d.ts +1 -0
- package/dist/cli/actions/release.mjs +8 -0
- package/dist/cli/actions/test.d.ts +3 -0
- package/dist/cli/actions/test.mjs +30 -0
- package/dist/cli/actions/types.d.ts +9 -0
- package/dist/cli/actions/types.mjs +134 -0
- package/dist/cli/actions/update.d.ts +1 -0
- package/dist/cli/actions/update.mjs +59 -0
- package/dist/cli/build.d.ts +3 -0
- package/dist/cli/build.mjs +22 -0
- package/dist/cli/create.d.ts +3 -0
- package/dist/cli/create.mjs +46 -0
- package/dist/cli/dev.d.ts +3 -0
- package/dist/cli/dev.mjs +13 -0
- package/dist/cli/example.d.ts +3 -0
- package/dist/cli/example.mjs +13 -0
- package/dist/cli/generate.d.ts +3 -0
- package/dist/cli/generate.mjs +29 -0
- package/dist/cli/index.d.ts +12 -0
- package/dist/cli/index.mjs +12 -0
- package/dist/cli/key.d.ts +3 -0
- package/dist/cli/key.mjs +7 -0
- package/dist/cli/make.d.ts +3 -0
- package/dist/cli/make.mjs +22 -0
- package/dist/cli/test.d.ts +3 -0
- package/dist/cli/test.mjs +13 -0
- package/dist/cli/types.d.ts +3 -0
- package/dist/cli/types.mjs +9 -0
- package/dist/cli/update.d.ts +3 -0
- package/dist/cli/update.mjs +7 -0
- package/dist/cli/utility.d.ts +3 -0
- package/dist/cli/utility.mjs +22 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.mjs +13970 -0
- package/dist/docs.d.ts +2 -0
- package/dist/docs.mjs +3 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.mjs +20 -0
- package/package.json +33 -38
- package/.gitignore +0 -10
- package/auto-imports.d.ts +0 -826
- package/components.d.ts +0 -22
- package/core/actions/README.md +0 -59
- package/core/actions/node_modules/.bin/markdown-it +0 -17
- package/core/actions/node_modules/.bin/mkdist +0 -17
- package/core/actions/package.json +0 -64
- package/core/actions/src/copy-types.ts +0 -22
- package/core/actions/src/generate/component-meta.ts +0 -94
- package/core/actions/src/generate/index.ts +0 -4
- package/core/actions/src/generate/lib-entries.ts +0 -106
- package/core/actions/src/generate/package-json.ts +0 -87
- package/core/actions/src/generate/vscode-custom-data.ts +0 -28
- package/core/actions/src/generate/vue-compat.ts +0 -17
- package/core/actions/src/generate-component-meta.ts +0 -19
- package/core/actions/src/generate-ide-helpers.ts +0 -23
- package/core/actions/src/generate-lib-entries.ts +0 -22
- package/core/actions/src/generate-package-json.ts +0 -15
- package/core/actions/src/generate-vscode-custom-data.ts +0 -20
- package/core/actions/src/generate-vue-compat.ts +0 -10
- package/core/arrays/README.md +0 -59
- package/core/arrays/node_modules/.bin/mkdist +0 -17
- package/core/arrays/node_modules/.bin/tsc +0 -17
- package/core/arrays/node_modules/.bin/tsserver +0 -17
- package/core/arrays/package.json +0 -50
- package/core/arrays/src/index.ts +0 -3
- package/core/build/README.md +0 -59
- package/core/build/entries/README.md +0 -7
- package/core/build/node_modules/.bin/jiti +0 -17
- package/core/build/node_modules/.bin/mkdist +0 -17
- package/core/build/node_modules/.bin/vite +0 -17
- package/core/build/node_modules/.bin/vite-ssg +0 -17
- package/core/build/node_modules/.bin/vue-docgen-web-types +0 -17
- package/core/build/package.json +0 -71
- package/core/build/src/example-vue.ts +0 -26
- package/core/build/src/example-wc.ts +0 -26
- package/core/build/src/functions.ts +0 -56
- package/core/build/src/index.ts +0 -7
- package/core/build/src/pages.ts +0 -50
- package/core/build/src/stacks.ts +0 -204
- package/core/build/src/vue-components.ts +0 -76
- package/core/build/src/web-components.ts +0 -63
- package/core/build/web-types.config.cjs +0 -4
- package/core/build/web-types.ts +0 -14
- package/core/collections/README.md +0 -59
- package/core/collections/node_modules/.bin/mkdist +0 -17
- package/core/collections/node_modules/.bin/tsc +0 -17
- package/core/collections/node_modules/.bin/tsserver +0 -17
- package/core/collections/package.json +0 -54
- package/core/collections/src/index.ts +0 -1
- package/core/fs/README.md +0 -59
- package/core/fs/node_modules/.bin/mkdist +0 -17
- package/core/fs/package.json +0 -56
- package/core/fs/src/index.ts +0 -170
- package/core/helpers/node_modules/.bin/mkdist +0 -17
- package/core/helpers/package.json +0 -58
- package/core/helpers/src/index.ts +0 -129
- package/core/modules/README.md +0 -61
- package/core/modules/node_modules/.bin/mkdist +0 -17
- package/core/modules/package.json +0 -51
- package/core/modules/src/i18n.ts +0 -23
- package/core/modules/src/nprogress.ts +0 -12
- package/core/modules/src/pwa.ts +0 -12
- package/core/objects/README.md +0 -59
- package/core/objects/node_modules/.bin/mkdist +0 -17
- package/core/objects/node_modules/.bin/tsc +0 -17
- package/core/objects/node_modules/.bin/tsserver +0 -17
- package/core/objects/package.json +0 -51
- package/core/objects/src/index.ts +0 -1
- package/core/paths/node_modules/.bin/mkdist +0 -17
- package/core/paths/node_modules/.bin/tsc +0 -17
- package/core/paths/node_modules/.bin/tsserver +0 -17
- package/core/paths/package.json +0 -51
- package/core/paths/src/index.ts +0 -178
- package/core/router/README.md +0 -59
- package/core/router/node_modules/.bin/mkdist +0 -17
- package/core/router/package.json +0 -51
- package/core/router/src/index.ts +0 -14
- package/core/security/README.md +0 -59
- package/core/security/node_modules/.bin/mkdist +0 -17
- package/core/security/package.json +0 -56
- package/core/security/src/crypt.ts +0 -14
- package/core/security/src/hash.ts +0 -52
- package/core/security/src/index.ts +0 -3
- package/core/security/src/key.ts +0 -11
- package/core/strings/README.md +0 -59
- package/core/strings/node_modules/.bin/mkdist +0 -17
- package/core/strings/node_modules/.bin/tsc +0 -17
- package/core/strings/node_modules/.bin/tsserver +0 -17
- package/core/strings/package.json +0 -63
- package/core/strings/src/index.ts +0 -14
- package/core/types/README.md +0 -59
- package/core/types/node_modules/.bin/markdown-it +0 -17
- package/core/types/node_modules/.bin/mkdist +0 -17
- package/core/types/node_modules/.bin/vite +0 -17
- package/core/types/node_modules/.bin/vitepress +0 -17
- package/core/types/package.json +0 -60
- package/core/types/src/app.ts +0 -131
- package/core/types/src/auto-imports.ts +0 -3
- package/core/types/src/build.ts +0 -3
- package/core/types/src/cli.ts +0 -49
- package/core/types/src/components.ts +0 -66
- package/core/types/src/deploy.ts +0 -11
- package/core/types/src/docs.ts +0 -3
- package/core/types/src/exit-code.ts +0 -10
- package/core/types/src/fs.ts +0 -17
- package/core/types/src/git.ts +0 -131
- package/core/types/src/hashing.ts +0 -107
- package/core/types/src/i18n.ts +0 -19
- package/core/types/src/index.ts +0 -21
- package/core/types/src/inspect.ts +0 -10
- package/core/types/src/layout.ts +0 -8
- package/core/types/src/library.ts +0 -148
- package/core/types/src/manifest.ts +0 -9
- package/core/types/src/markdown.ts +0 -198
- package/core/types/src/pages.ts +0 -8
- package/core/types/src/pwa.ts +0 -8
- package/core/types/src/ssg.ts +0 -3
- package/core/types/src/ui.ts +0 -141
- package/core/ui/README.md +0 -60
- package/core/ui/node_modules/.bin/mkdist +0 -17
- package/core/ui/node_modules/.bin/tsc +0 -17
- package/core/ui/node_modules/.bin/tsserver +0 -17
- package/core/ui/node_modules/.bin/vue-tsc +0 -17
- package/core/ui/package.json +0 -62
- package/core/ui/src/index.ts +0 -60
- package/custom-elements.json +0 -14
- package/examples/vue-components/App.vue +0 -12
- package/examples/vue-components/favicon.png +0 -0
- package/examples/vue-components/index.html +0 -20
- package/examples/web-components/favicon.png +0 -0
- package/examples/web-components/index.html +0 -13
- package/functions/node_modules/.bin/artisan +0 -17
- package/functions/node_modules/.bin/stacks +0 -17
- package/functions/node_modules/.bin/stx +0 -17
- package/functions/package.json +0 -40
- package/netlify.toml +0 -18
- package/nitro.config.ts +0 -6
- package/pages/App.vue +0 -26
- package/pages/index.html +0 -23
- package/pages/main.ts +0 -26
- package/pages/public/_headers +0 -3
- package/pages/public/favicon-dark.svg +0 -3
- package/pages/public/favicon.svg +0 -3
- package/pages/public/pwa-192x192.png +0 -0
- package/pages/public/pwa-512x512.png +0 -0
- package/pages/public/safari-pinned-tab.svg +0 -41
- package/pages/styles/main.css +0 -29
- package/pages/styles/markdown.css +0 -28
- package/scripts/ensure-env.sh +0 -248
- package/shims.d.ts +0 -29
- package/simple-git-hooks.cjs +0 -4
- package/src/cli/actions/build.ts +0 -160
- package/src/cli/actions/commit.ts +0 -9
- package/src/cli/actions/dev.ts +0 -47
- package/src/cli/actions/examples.ts +0 -74
- package/src/cli/actions/fresh.ts +0 -9
- package/src/cli/actions/generate.ts +0 -159
- package/src/cli/actions/index.ts +0 -12
- package/src/cli/actions/key.ts +0 -31
- package/src/cli/actions/lint.ts +0 -19
- package/src/cli/actions/make.ts +0 -116
- package/src/cli/actions/release.ts +0 -9
- package/src/cli/actions/test.ts +0 -39
- package/src/cli/actions/types.ts +0 -180
- package/src/cli/actions/update.ts +0 -90
- package/src/cli/build.ts +0 -49
- package/src/cli/create.ts +0 -71
- package/src/cli/dev.ts +0 -28
- package/src/cli/example.ts +0 -28
- package/src/cli/generate.ts +0 -64
- package/src/cli/index.ts +0 -13
- package/src/cli/key.ts +0 -12
- package/src/cli/make.ts +0 -47
- package/src/cli/test.ts +0 -24
- package/src/cli/types.ts +0 -18
- package/src/cli/update.ts +0 -17
- package/src/cli/utility.ts +0 -39
- package/src/cli.ts +0 -48
- package/src/docs.ts +0 -4
- package/src/index.ts +0 -22
- package/tsconfig.json +0 -96
- package/vitest.config.ts +0 -22
- package/vue-components/dist/.gitkeep +0 -0
- package/vue-components/index.html +0 -13
- package/vue-components/main.ts +0 -18
- package/vue-components/node_modules/.bin/artisan +0 -17
- package/vue-components/node_modules/.bin/stacks +0 -17
- package/vue-components/node_modules/.bin/stx +0 -17
- package/vue-components/package.json +0 -40
- package/web-components/dist/.gitkeep +0 -0
- package/web-components/node_modules/.bin/artisan +0 -17
- package/web-components/node_modules/.bin/stacks +0 -17
- package/web-components/node_modules/.bin/stx +0 -17
- package/web-components/package.json +0 -40
- package/web-types.json +0 -67
package/src/cli/actions/types.ts
DELETED
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
import consola from 'consola'
|
|
2
|
-
import Prompts from 'prompts'
|
|
3
|
-
import { runNpmScript } from '@stacksjs/helpers'
|
|
4
|
-
import { ExitCode, NpmScript } from '@stacksjs/types'
|
|
5
|
-
import { lintFix } from './lint'
|
|
6
|
-
|
|
7
|
-
const { prompts } = Prompts
|
|
8
|
-
|
|
9
|
-
export async function generateTypes() {
|
|
10
|
-
try {
|
|
11
|
-
await runNpmScript(NpmScript.TypesGenerate, 'ignore')
|
|
12
|
-
consola.success('Types were generated successfully.')
|
|
13
|
-
}
|
|
14
|
-
catch (error) {
|
|
15
|
-
consola.error('There was an error generating your types.')
|
|
16
|
-
consola.error(error)
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export async function fixTypes() {
|
|
21
|
-
try {
|
|
22
|
-
await runNpmScript(NpmScript.TypesFix, 'ignore')
|
|
23
|
-
consola.success('Types were generated successfully.')
|
|
24
|
-
}
|
|
25
|
-
catch (error) {
|
|
26
|
-
consola.error('There was an error generating your types.')
|
|
27
|
-
consola.error(error)
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export async function generateLibEntries() {
|
|
32
|
-
try {
|
|
33
|
-
await runNpmScript(NpmScript.GenerateEntries, 'ignore')
|
|
34
|
-
consola.success('Library entry points were generated successfully.')
|
|
35
|
-
}
|
|
36
|
-
catch (error) {
|
|
37
|
-
consola.error('There was an error generating your library entry points.')
|
|
38
|
-
consola.error(error)
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export async function generateVueCompat() {
|
|
43
|
-
try {
|
|
44
|
-
await runNpmScript(NpmScript.GenerateVueCompat, 'ignore')
|
|
45
|
-
consola.success('Vue 2 & 3 compatibility was generated successfully.')
|
|
46
|
-
}
|
|
47
|
-
catch (error) {
|
|
48
|
-
consola.error('There was an error generating Vue compatibility.')
|
|
49
|
-
consola.error(error)
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export async function generateWebTypes() {
|
|
54
|
-
try {
|
|
55
|
-
await runNpmScript(NpmScript.GenerateWebTypes, 'ignore')
|
|
56
|
-
consola.success('Successfully generated the web-types.json file.')
|
|
57
|
-
}
|
|
58
|
-
catch (error) {
|
|
59
|
-
consola.error('There was an error generating the web-types.json file')
|
|
60
|
-
consola.error(error)
|
|
61
|
-
process.exit(ExitCode.FatalError)
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export async function generateVsCodeCustomData() {
|
|
66
|
-
try {
|
|
67
|
-
await runNpmScript(NpmScript.GenerateVsCodeCustomData, 'ignore')
|
|
68
|
-
await lintFix('ignore') // the created json file needs to be linted
|
|
69
|
-
consola.success('Successfully generated the custom-elements.json file.')
|
|
70
|
-
}
|
|
71
|
-
catch (error) {
|
|
72
|
-
consola.error('There was an error generating the custom-elements.json file')
|
|
73
|
-
consola.error(error)
|
|
74
|
-
process.exit(ExitCode.FatalError)
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export async function generateIdeHelpers() {
|
|
79
|
-
try {
|
|
80
|
-
await runNpmScript(NpmScript.GenerateIdeHelpers, 'ignore')
|
|
81
|
-
await lintFix('ignore') // the created json file needs to be linted
|
|
82
|
-
consola.success('Successfully generated IDE helpers.')
|
|
83
|
-
}
|
|
84
|
-
catch (error) {
|
|
85
|
-
consola.error('There was an error generating IDE helpers.')
|
|
86
|
-
consola.error(error)
|
|
87
|
-
process.exit(ExitCode.FatalError)
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export async function generateComponentMeta() {
|
|
92
|
-
try {
|
|
93
|
-
await runNpmScript(NpmScript.GenerateComponentMeta, 'ignore')
|
|
94
|
-
await lintFix('ignore') // the created json file needs to be linted
|
|
95
|
-
consola.success('Successfully generated component meta.')
|
|
96
|
-
}
|
|
97
|
-
catch (error) {
|
|
98
|
-
consola.error('There was an error generating your component meta information.')
|
|
99
|
-
consola.error(error)
|
|
100
|
-
process.exit(ExitCode.FatalError)
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export async function startGenerationProcess(options: any) {
|
|
105
|
-
if (options.types || options === 'types') {
|
|
106
|
-
await generateTypes()
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
else if (options.entries || options === 'entries') {
|
|
110
|
-
await generateLibEntries()
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
else if (options.webTypes || options === 'web-types') {
|
|
114
|
-
await generateWebTypes()
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
else if (options.customData || options === 'custom-data') {
|
|
118
|
-
await generateVsCodeCustomData()
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
else if (options.ideHelpers || options === 'ide-helpers') {
|
|
122
|
-
await generateIdeHelpers()
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
else if (options.vueCompatibility || options === 'vue-compatibility') {
|
|
126
|
-
await generateVueCompat()
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
else if (options.componentMeta || options === 'component-meta') {
|
|
130
|
-
await generateComponentMeta()
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
else {
|
|
134
|
-
const answer = await prompts.select({
|
|
135
|
-
type: 'select',
|
|
136
|
-
name: 'generate',
|
|
137
|
-
message: 'What are you trying to generate?',
|
|
138
|
-
choices: [ // todo: should be a multi-select
|
|
139
|
-
{ title: '1.) TypeScript Types', value: 'types' },
|
|
140
|
-
{ title: '2.) Library Entry Points', value: 'entries' },
|
|
141
|
-
{ title: '3.) Web Types', value: 'web-types' },
|
|
142
|
-
{ title: '4.) VS Code Custom Data', value: 'custom-data' },
|
|
143
|
-
{ title: '5.) IDE Helpers', value: 'ide-helpers' },
|
|
144
|
-
{ title: '6.) Vue 2 & 3 Compatibility', value: 'vue-compatibility' },
|
|
145
|
-
{ title: '7.) Component Meta', value: 'component-meta' },
|
|
146
|
-
],
|
|
147
|
-
initial: 0,
|
|
148
|
-
})
|
|
149
|
-
|
|
150
|
-
// @ts-expect-error the answer object type expects to return a void type but it returns a string
|
|
151
|
-
if (answer === 'types')
|
|
152
|
-
await generateTypes()
|
|
153
|
-
|
|
154
|
-
// @ts-expect-error the answer object type expects to return a void type but it returns a string
|
|
155
|
-
else if (answer === 'entries')
|
|
156
|
-
await generateLibEntries()
|
|
157
|
-
|
|
158
|
-
// @ts-expect-error the answer object type expects to return a void type but it returns a string
|
|
159
|
-
else if (answer === 'web-types')
|
|
160
|
-
await generateWebTypes()
|
|
161
|
-
|
|
162
|
-
// @ts-expect-error the answer object type expects to return a void type but it returns a string
|
|
163
|
-
else if (answer === 'custom-data')
|
|
164
|
-
await generateVsCodeCustomData()
|
|
165
|
-
|
|
166
|
-
// @ts-expect-error the answer object type expects to return a void type but it returns a string
|
|
167
|
-
else if (answer === 'ide-helpers')
|
|
168
|
-
await generateIdeHelpers()
|
|
169
|
-
|
|
170
|
-
// @ts-expect-error the answer object type expects to return a void type but it returns a string
|
|
171
|
-
else if (answer === 'vue-compatibility')
|
|
172
|
-
await generateVueCompat()
|
|
173
|
-
|
|
174
|
-
// @ts-expect-error the answer object type expects to return a void type but it returns a string
|
|
175
|
-
else if (answer === 'component-meta')
|
|
176
|
-
await generateComponentMeta()
|
|
177
|
-
|
|
178
|
-
else process.exit(ExitCode.InvalidArgument)
|
|
179
|
-
}
|
|
180
|
-
}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import * as ezSpawn from '@jsdevtools/ez-spawn'
|
|
2
|
-
import consola from 'consola'
|
|
3
|
-
import Prompts from 'prompts'
|
|
4
|
-
import { copyFolder, deleteEmptyFolders, deleteFiles, deleteFolder, doesFolderExist } from '@stacksjs/fs'
|
|
5
|
-
import { resolve } from '@stacksjs/paths'
|
|
6
|
-
import { runNpmScript } from '@stacksjs/helpers'
|
|
7
|
-
import { ExitCode, NpmScript } from '@stacksjs/types'
|
|
8
|
-
|
|
9
|
-
const { prompts } = Prompts
|
|
10
|
-
|
|
11
|
-
export async function stacks(options: any) {
|
|
12
|
-
// first, we need to update the framework, if updates available
|
|
13
|
-
// TODO: need to delete all files except the whitelisted ones
|
|
14
|
-
if (options.framework) {
|
|
15
|
-
try {
|
|
16
|
-
// check if the .stacks folder has any updates
|
|
17
|
-
// https://carlosbecker.com/posts/git-changed/
|
|
18
|
-
await ezSpawn.async('git diff --quiet HEAD -- ./.stacks', { stdio: 'inherit', cwd: process.cwd() })
|
|
19
|
-
}
|
|
20
|
-
catch (error: any) {
|
|
21
|
-
if (error.status === 1) {
|
|
22
|
-
// even though the ./.stacks folder should not be edited, instead config values should be adjusted,
|
|
23
|
-
// there is a chance that users may apply local core edits, as it's totally acceptable, as long as
|
|
24
|
-
// the user knows what they are doing. There is also a change that simply the deps within .stacks
|
|
25
|
-
// folder have been updated and that could produce a diff.
|
|
26
|
-
if (!options.force) {
|
|
27
|
-
const answer = await prompts.confirm({
|
|
28
|
-
type: 'select',
|
|
29
|
-
name: 'framework-update',
|
|
30
|
-
message: 'Would you like to overwrite your ./stacks changes in favor of the Stacks update?',
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
// @ts-expect-error the answer object type expects to return a void type but it returns boolean
|
|
34
|
-
if (!answer) {
|
|
35
|
-
consola.info('The framework was not updated.')
|
|
36
|
-
consola.info('Note: if you commit your changes and replay the update, you will see what has changed.')
|
|
37
|
-
process.exit(ExitCode.Success)
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
consola.info('Downloading framework updates...')
|
|
44
|
-
|
|
45
|
-
const tempFolderName = 'updates'
|
|
46
|
-
const tempUpdatePath = resolve(process.cwd(), tempFolderName)
|
|
47
|
-
if (doesFolderExist(tempUpdatePath))
|
|
48
|
-
await deleteFolder(tempUpdatePath)
|
|
49
|
-
|
|
50
|
-
await ezSpawn.async(`giget stacks ${tempFolderName}`, { stdio: options.debug ? 'inherit' : 'ignore' }) // TODO: stdio should inherit when APP_DEBUG or debug flag is true
|
|
51
|
-
consola.success('Downloaded framework updates.')
|
|
52
|
-
|
|
53
|
-
consola.info('Updating framework...')
|
|
54
|
-
|
|
55
|
-
const frameworkPath = resolve(process.cwd(), '.stacks')
|
|
56
|
-
const exclude = ['functions/package.json', 'vue-components/package.json', 'web-components/package.json', 'auto-imports.d.ts', 'components.d.ts', 'dist']
|
|
57
|
-
|
|
58
|
-
await deleteFiles(frameworkPath, exclude)
|
|
59
|
-
|
|
60
|
-
// loop 5 times to make sure all "deep empty" folders are deleted
|
|
61
|
-
for (let i = 0; i < 5; i++)
|
|
62
|
-
await deleteEmptyFolders(frameworkPath)
|
|
63
|
-
|
|
64
|
-
const from = resolve(process.cwd(), './updates/.stacks')
|
|
65
|
-
const to = frameworkPath
|
|
66
|
-
await copyFolder(from, to, exclude)
|
|
67
|
-
|
|
68
|
-
consola.info('Cleanup...')
|
|
69
|
-
await deleteFolder(tempUpdatePath)
|
|
70
|
-
consola.success('Framework updated.')
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// then, we need to update the project's & framework's dependencies, if updates available
|
|
74
|
-
if (options.dependencies) {
|
|
75
|
-
consola.info('Updating dependencies...')
|
|
76
|
-
await runNpmScript(NpmScript.Update)
|
|
77
|
-
consola.success('Updated dependencies.')
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
if (options.packageManager) {
|
|
81
|
-
consola.info('Updating pnpm...')
|
|
82
|
-
const version = await runNpmScript(NpmScript.UpdatePackageManager)
|
|
83
|
-
consola.success('Successfully updated pnpm to: ', version)
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
// TODO: also update CI files & configurations, and other files, possibly
|
|
87
|
-
// ideally we want this to be smart enough to update only the files that have changed
|
|
88
|
-
|
|
89
|
-
// TODO: this script should trigger regeneration of auto-imports.d.ts & components.d.ts
|
|
90
|
-
}
|
package/src/cli/build.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import type { CAC } from 'cac'
|
|
2
|
-
import { startBuildProcess } from './actions/build'
|
|
3
|
-
|
|
4
|
-
async function build(stacks: CAC) {
|
|
5
|
-
stacks
|
|
6
|
-
.command('build', 'Automagically build any of your libraries/packages for production use. Select any of the following packages')
|
|
7
|
-
.option('-c, --components', 'Build your component library')
|
|
8
|
-
.option('-w, --web-components', 'Build your framework agnostic web component library') // these are automatically built with your -c option as well
|
|
9
|
-
.option('-e, --elements', 'An alias to the -w flag')
|
|
10
|
-
.option('-f, --functions', 'Build your function library')
|
|
11
|
-
.option('-d, --docs', 'Build your documentation site')
|
|
12
|
-
.option('--debug', 'Add additional debug logs', { default: false })
|
|
13
|
-
// .option('-p, --pages', 'Build your pages')
|
|
14
|
-
.action(async (options: any) => {
|
|
15
|
-
await startBuildProcess(options)
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
stacks
|
|
19
|
-
.command('build:components', 'Automagically build your component libraries for production use & npm/CDN distribution.')
|
|
20
|
-
.action(async () => {
|
|
21
|
-
await startBuildProcess('components')
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
stacks
|
|
25
|
-
.command('build:functions', 'Automagically build your function library for production use & npm/CDN distribution.')
|
|
26
|
-
.action(async () => {
|
|
27
|
-
await startBuildProcess('functions')
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
stacks
|
|
31
|
-
.command('build:web-components', 'Automagically build web component library for production use & npm/CDN distribution.')
|
|
32
|
-
.action(async () => {
|
|
33
|
-
await startBuildProcess('web-components')
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
stacks
|
|
37
|
-
.command('build:docs', 'Automagically build your documentation site.')
|
|
38
|
-
.action(async () => {
|
|
39
|
-
await startBuildProcess('docs')
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
stacks
|
|
43
|
-
.command('build:stacks', 'Build the core Stacks framework.')
|
|
44
|
-
.action(async () => {
|
|
45
|
-
await startBuildProcess('stacks')
|
|
46
|
-
})
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export { build }
|
package/src/cli/create.ts
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import type { CAC } from 'cac'
|
|
2
|
-
import consola from 'consola'
|
|
3
|
-
import * as ezSpawn from '@jsdevtools/ez-spawn'
|
|
4
|
-
import { resolve } from 'pathe'
|
|
5
|
-
import { bold, cyan, dim, link } from 'kolorist'
|
|
6
|
-
import { useOnline } from '@vueuse/core'
|
|
7
|
-
import { isFolder } from '@stacksjs/fs'
|
|
8
|
-
import { ExitCode } from '@stacksjs/types'
|
|
9
|
-
import { version } from '../../package.json'
|
|
10
|
-
import { generate as generateAppKey } from './actions/key'
|
|
11
|
-
|
|
12
|
-
async function create(stack: CAC) {
|
|
13
|
-
stack
|
|
14
|
-
.option('-n, --name <name>', 'Name of the stack')
|
|
15
|
-
.option('-u, --ui', 'Are you building a UI?', { default: true }) // if no, disregard remainder of questions wrt UI
|
|
16
|
-
.option('-c, --components', 'Are you building UI components?', { default: true }) // if no, -v and -w would be false
|
|
17
|
-
.option('-w, --web-components', 'Automagically built optimized custom elements/web components?', { default: true })
|
|
18
|
-
.option('-v, --vue', 'Automagically built a Vue component library?', { default: true })
|
|
19
|
-
.option('-p, --pages', 'How about pages?', { default: true }) // pages need an HTTP server
|
|
20
|
-
.option('-f, --functions', 'Are you developing functions/composables?', { default: true }) // if no, API would be false
|
|
21
|
-
.option('-a, --api', 'Are you building an API?', { default: true }) // APIs need an HTTP server & assumes functions is true
|
|
22
|
-
.option('-d, --database', 'Do you need a database?', { default: true })
|
|
23
|
-
.option('--debug', 'Add additional debug logs', { default: false })
|
|
24
|
-
// .option('--auth', 'Scaffold an authentication?', { default: true })
|
|
25
|
-
|
|
26
|
-
stack
|
|
27
|
-
.command('')
|
|
28
|
-
.action(async (args: any) => {
|
|
29
|
-
const name = stack.args[0] || args.name || '.'
|
|
30
|
-
const path = resolve(process.cwd(), name)
|
|
31
|
-
|
|
32
|
-
console.log()
|
|
33
|
-
console.log(cyan(bold('Stacks CLI')) + dim(` v${version}`))
|
|
34
|
-
console.log()
|
|
35
|
-
|
|
36
|
-
if (await isFolder(path)) {
|
|
37
|
-
consola.error(`Path ${path} already exists`)
|
|
38
|
-
process.exit(ExitCode.FatalError)
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const online = useOnline()
|
|
42
|
-
if (!online) {
|
|
43
|
-
consola.info('It appears you are disconnected from the internet. The Stacks setup requires a brief internet connection for setup.')
|
|
44
|
-
process.exit(ExitCode.FatalError)
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
consola.info('Setting up your stack.')
|
|
48
|
-
await ezSpawn.async(`giget stacks ${name}`, { stdio: args.debug ? 'inherit' : 'ignore' }) // todo: stdio should inherit when APP_DEBUG or debug flag is true
|
|
49
|
-
consola.success(`Successfully scaffolded your project at ${cyan(path)}`)
|
|
50
|
-
|
|
51
|
-
consola.info('Ensuring your environment is ready...')
|
|
52
|
-
// todo: this should check for whether the proper Node version is installed because fnm is not a requirement
|
|
53
|
-
await ezSpawn.async('fnm use', { stdio: args.debug ? 'inherit' : 'ignore', cwd: path }) // todo: stdio should inherit when APP_DEBUG or debug flag is true
|
|
54
|
-
consola.success('Environment is ready.')
|
|
55
|
-
|
|
56
|
-
consola.info('Installing & setting up Stacks.')
|
|
57
|
-
await ezSpawn.async('pnpm install', { stdio: args.debug ? 'inherit' : 'ignore', cwd: path }) // todo: stdio should inherit when APP_DEBUG or debug flag is true
|
|
58
|
-
await ezSpawn.async('cp .env.example .env', { stdio: args.debug ? 'inherit' : 'ignore', cwd: path }) // todo: stdio should inherit when APP_DEBUG or debug flag is true
|
|
59
|
-
await generateAppKey()
|
|
60
|
-
await ezSpawn.async('git init', { stdio: args.debug ? 'inherit' : 'ignore', cwd: path }) // todo: stdio should inherit when APP_DEBUG or debug flag is true
|
|
61
|
-
consola.success('Installed & set-up 🚀')
|
|
62
|
-
|
|
63
|
-
console.log()
|
|
64
|
-
consola.info(bold('Welcome to the Stacks Framework! ⚛️'))
|
|
65
|
-
console.log(`cd ${link(path, `vscode://file/${path}:1`)} && code .`)
|
|
66
|
-
console.log()
|
|
67
|
-
consola.log('To learn more, visit https://stacksjs.dev')
|
|
68
|
-
})
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export { create }
|
package/src/cli/dev.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { CAC } from 'cac'
|
|
2
|
-
import { startDevelopmentServer } from './actions/dev'
|
|
3
|
-
|
|
4
|
-
async function dev(stacks: CAC) {
|
|
5
|
-
stacks
|
|
6
|
-
.command('dev', 'Start the development server for any of the following packages')
|
|
7
|
-
.option('-c, --components', 'Start the Components development server')
|
|
8
|
-
.option('-f, --functions', 'Start the Functions development server')
|
|
9
|
-
.option('-d, --docs', 'Start the Documentation development server')
|
|
10
|
-
// .option('-p, --pages', 'Start the Pages development server')
|
|
11
|
-
.action(async (options: any) => {
|
|
12
|
-
await startDevelopmentServer(options)
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
stacks
|
|
16
|
-
.command('dev:components', 'Start the development server for your component library')
|
|
17
|
-
.action(async () => {
|
|
18
|
-
await startDevelopmentServer('components')
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
stacks
|
|
22
|
-
.command('dev:docs', 'Start the development server for your documentation')
|
|
23
|
-
.action(async () => {
|
|
24
|
-
await startDevelopmentServer('docs')
|
|
25
|
-
})
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export { dev }
|
package/src/cli/example.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { CAC } from 'cac'
|
|
2
|
-
import { runExample } from './actions/examples'
|
|
3
|
-
|
|
4
|
-
async function example(stacks: CAC) {
|
|
5
|
-
stacks
|
|
6
|
-
.command('example', 'Test your libraries against your built bundle.')
|
|
7
|
-
.option('-c, --components', 'Test your Vue component library')
|
|
8
|
-
.option('-v, --vue', 'Test your Vue component library')
|
|
9
|
-
.option('-w, --web-components', 'Test your web component library')
|
|
10
|
-
.action(async (options) => {
|
|
11
|
-
await runExample(options)
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
stacks
|
|
15
|
-
.command('example:vue', 'Test your Vue component library.')
|
|
16
|
-
.alias('example:components')
|
|
17
|
-
.action(async () => {
|
|
18
|
-
await runExample('vue')
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
stacks
|
|
22
|
-
.command('example:web-components', 'Test your Web Component library.')
|
|
23
|
-
.action(async () => {
|
|
24
|
-
await runExample('web-components')
|
|
25
|
-
})
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export { example }
|
package/src/cli/generate.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import type { CAC } from 'cac'
|
|
2
|
-
import { generateComponentMeta, generateIdeHelpers, generateLibEntries, generateVsCodeCustomData, generateVueCompat, generateWebTypes, startGenerationProcess } from './actions/generate'
|
|
3
|
-
import { generateTypes } from './actions/types'
|
|
4
|
-
|
|
5
|
-
async function generate(stacks: CAC) {
|
|
6
|
-
stacks
|
|
7
|
-
.command('generate', 'Automagically build any of your libraries/packages for production use. Select any of the following packages')
|
|
8
|
-
.option('-t, --types', 'Generate your TypeScript types')
|
|
9
|
-
.option('-e, --entries', 'Generate your function & component library entry points')
|
|
10
|
-
.option('-w, --web-types', 'Generate web-types.json for IDEs')
|
|
11
|
-
.option('-c, --custom-data', 'Generate VS Code custom data (custom-elements.json) for IDEs')
|
|
12
|
-
.option('-i, --ide-helpers', 'Generate IDE helpers')
|
|
13
|
-
.option('-v, --vue-compatibility', 'Generate Vue 2 & 3 compatibility')
|
|
14
|
-
.option('-c, --component-meta', 'Generate component meta information')
|
|
15
|
-
.option('--debug', 'Add additional debug logs', { default: false })
|
|
16
|
-
.action(async (options: any) => {
|
|
17
|
-
await startGenerationProcess(options)
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
stacks
|
|
21
|
-
.command('generate:types', 'Generate the types of & for your library/libraries')
|
|
22
|
-
.action(async () => {
|
|
23
|
-
await generateTypes()
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
stacks
|
|
27
|
-
.command('generate:entries', 'Generate the entry points for your libraries')
|
|
28
|
-
.action(async () => {
|
|
29
|
-
// run the generate:entries command
|
|
30
|
-
await generateLibEntries()
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
stacks
|
|
34
|
-
.command('generate:vue-compatibility', 'Generate Vue 2 & 3 compatibility')
|
|
35
|
-
.action(async () => {
|
|
36
|
-
await generateVueCompat()
|
|
37
|
-
})
|
|
38
|
-
|
|
39
|
-
stacks
|
|
40
|
-
.command('generate:web-types', 'Generate web-types.json for IDEs')
|
|
41
|
-
.action(async () => {
|
|
42
|
-
await generateWebTypes()
|
|
43
|
-
})
|
|
44
|
-
|
|
45
|
-
stacks
|
|
46
|
-
.command('generate:vscode-custom-data', 'Generate VS Code custom data (custom-elements.json) for IDEs')
|
|
47
|
-
.action(async () => {
|
|
48
|
-
await generateVsCodeCustomData()
|
|
49
|
-
})
|
|
50
|
-
|
|
51
|
-
stacks
|
|
52
|
-
.command('generate:ide-helpers', 'Generate IDE helpers')
|
|
53
|
-
.action(async () => {
|
|
54
|
-
await generateIdeHelpers()
|
|
55
|
-
})
|
|
56
|
-
|
|
57
|
-
stacks
|
|
58
|
-
.command('generate:component-meta', 'Generate component meta information')
|
|
59
|
-
.action(async () => {
|
|
60
|
-
await generateComponentMeta()
|
|
61
|
-
})
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export { generate }
|
package/src/cli/index.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { build } from './build'
|
|
2
|
-
import { dev } from './dev'
|
|
3
|
-
import { example } from './example'
|
|
4
|
-
import { generate } from './generate'
|
|
5
|
-
import { utility } from './utility'
|
|
6
|
-
import { make } from './make'
|
|
7
|
-
import { test } from './test'
|
|
8
|
-
import { create } from './create'
|
|
9
|
-
import { update } from './update'
|
|
10
|
-
import { types } from './types'
|
|
11
|
-
import { key } from './key'
|
|
12
|
-
|
|
13
|
-
export { dev, build, utility, make, example, test, create, update, generate, key, types }
|
package/src/cli/key.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { CAC } from 'cac'
|
|
2
|
-
import { generate as generateAppKey } from './actions/key'
|
|
3
|
-
|
|
4
|
-
async function key(stacks: CAC) {
|
|
5
|
-
stacks
|
|
6
|
-
.command('key:generate', 'Generate & set the application key.')
|
|
7
|
-
.action(async () => {
|
|
8
|
-
await generateAppKey()
|
|
9
|
-
})
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export { key }
|
package/src/cli/make.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import type { CAC } from 'cac'
|
|
2
|
-
import { component as makeComponent, fx as makeFunction, language as makeLanguage, page as makePage, stack as makeStack } from './actions/make'
|
|
3
|
-
|
|
4
|
-
async function make(stacks: CAC) {
|
|
5
|
-
stacks
|
|
6
|
-
.command('make', 'Test your libraries against your built bundle.')
|
|
7
|
-
.option('-c, --component', 'Scaffolds a component.')
|
|
8
|
-
.option('-p, --page', 'Scaffolds a page.')
|
|
9
|
-
.option('-f, --function', 'Scaffolds a function.')
|
|
10
|
-
.option('-l, --language', 'Scaffolds a language.')
|
|
11
|
-
.option('-s, --stack', 'Scaffolds a new stack.')
|
|
12
|
-
.action(async (options) => {
|
|
13
|
-
await runMake(stacks.args[0], options)
|
|
14
|
-
})
|
|
15
|
-
|
|
16
|
-
stacks
|
|
17
|
-
.command('make:component', 'Scaffolds a component.')
|
|
18
|
-
.action(async () => {
|
|
19
|
-
await makeComponent(stacks.args[0])
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
stacks
|
|
23
|
-
.command('make:page', 'Scaffolds a page.')
|
|
24
|
-
.action(async () => {
|
|
25
|
-
await makePage(stacks.args[0])
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
stacks
|
|
29
|
-
.command('make:function', 'Scaffolds a function.')
|
|
30
|
-
.action(async () => {
|
|
31
|
-
await makeFunction(stacks.args[0])
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
stacks
|
|
35
|
-
.command('make:lang', 'Scaffolds a language file.')
|
|
36
|
-
.action(async () => {
|
|
37
|
-
await makeLanguage(stacks.args[0])
|
|
38
|
-
})
|
|
39
|
-
|
|
40
|
-
stacks
|
|
41
|
-
.command('make:stack', 'Scaffolds a new stack.')
|
|
42
|
-
.action(async () => {
|
|
43
|
-
await makeStack(stacks.args[0])
|
|
44
|
-
})
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export { make }
|
package/src/cli/test.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { CAC } from 'cac'
|
|
2
|
-
import { generateTestCoverageReport, runTestSuite, typecheck } from './actions/test'
|
|
3
|
-
|
|
4
|
-
async function test(stacks: CAC) {
|
|
5
|
-
stacks
|
|
6
|
-
.command('test', 'Runs your test suite.')
|
|
7
|
-
.action(async () => {
|
|
8
|
-
await runTestSuite()
|
|
9
|
-
})
|
|
10
|
-
|
|
11
|
-
stacks
|
|
12
|
-
.command('test:types', 'Typechecks your codebase.')
|
|
13
|
-
.action(async () => {
|
|
14
|
-
await typecheck()
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
stacks
|
|
18
|
-
.command('test:coverage', 'Generates a test coverage report.')
|
|
19
|
-
.action(async () => {
|
|
20
|
-
await generateTestCoverageReport()
|
|
21
|
-
})
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export { test }
|
package/src/cli/types.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { CAC } from 'cac'
|
|
2
|
-
import { generateTypes } from './actions/types'
|
|
3
|
-
|
|
4
|
-
async function types(stacks: CAC) {
|
|
5
|
-
stacks
|
|
6
|
-
.command('types:generate', 'Generate the types of & for your library/libraries')
|
|
7
|
-
.action(async () => {
|
|
8
|
-
await generateTypes()
|
|
9
|
-
})
|
|
10
|
-
|
|
11
|
-
stacks
|
|
12
|
-
.command('types:fix', 'Generate the types of & for your library/libraries')
|
|
13
|
-
.action(async () => {
|
|
14
|
-
// await fixTypes()
|
|
15
|
-
})
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export { types }
|
package/src/cli/update.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { CAC } from 'cac'
|
|
2
|
-
import { stacks as updateStacks } from './actions/update'
|
|
3
|
-
|
|
4
|
-
async function update(stacks: CAC) {
|
|
5
|
-
stacks
|
|
6
|
-
.command('update', 'Updates dependencies & framework.')
|
|
7
|
-
.option('-c, --framework', 'Update the Stacks framework', { default: true })
|
|
8
|
-
.option('-d, --dependencies', 'Update your dependencies', { default: true })
|
|
9
|
-
.option('-p, --package-manager', 'Update your package manager, i.e. pnpm', { default: true })
|
|
10
|
-
.option('-f, --force', 'Overwrite possible local updates with remote framework updates', { default: false })
|
|
11
|
-
.option('--debug', 'Add additional debug logs', { default: false })
|
|
12
|
-
.action(async (options: any) => {
|
|
13
|
-
await updateStacks(options)
|
|
14
|
-
})
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { update }
|