@slicemachine/init 1.1.19 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +88 -32
- package/bin/slicemachine-init.js +3 -0
- package/dist/SliceMachineInitProcess.cjs +749 -0
- package/dist/SliceMachineInitProcess.cjs.map +1 -0
- package/dist/SliceMachineInitProcess.d.ts +48 -0
- package/dist/SliceMachineInitProcess.js +731 -0
- package/dist/SliceMachineInitProcess.js.map +1 -0
- package/dist/_node_modules/@babel/code-frame/lib/index.cjs +144 -0
- package/dist/_node_modules/@babel/code-frame/lib/index.cjs.map +1 -0
- package/dist/_node_modules/@babel/code-frame/lib/index.js +143 -0
- package/dist/_node_modules/@babel/code-frame/lib/index.js.map +1 -0
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/identifier.cjs +82 -0
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/identifier.cjs.map +1 -0
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/identifier.js +83 -0
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/identifier.js.map +1 -0
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/index.cjs +62 -0
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/index.cjs.map +1 -0
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/index.js +61 -0
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/index.js.map +1 -0
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/keyword.cjs +35 -0
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/keyword.cjs.map +1 -0
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/keyword.js +36 -0
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/keyword.js.map +1 -0
- package/dist/_node_modules/@babel/highlight/lib/index.cjs +100 -0
- package/dist/_node_modules/@babel/highlight/lib/index.cjs.map +1 -0
- package/dist/_node_modules/@babel/highlight/lib/index.js +99 -0
- package/dist/_node_modules/@babel/highlight/lib/index.js.map +1 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/adapters/fs.cjs +24 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/adapters/fs.cjs.map +1 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/adapters/fs.js +23 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/adapters/fs.js.map +1 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/constants.cjs +17 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/constants.cjs.map +1 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/constants.js +18 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/constants.js.map +1 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/index.cjs +35 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/index.cjs.map +1 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/index.js +36 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/index.js.map +1 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/providers/async.cjs +116 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/providers/async.cjs.map +1 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/providers/async.js +117 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/providers/async.js.map +1 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/providers/common.cjs +13 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/providers/common.cjs.map +1 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/providers/common.js +14 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/providers/common.js.map +1 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/providers/sync.cjs +64 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/providers/sync.cjs.map +1 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/providers/sync.js +65 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/providers/sync.js.map +1 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/settings.cjs +31 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/settings.cjs.map +1 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/settings.js +30 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/settings.js.map +1 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/utils/fs.cjs +22 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/utils/fs.cjs.map +1 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/utils/fs.js +23 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/utils/fs.js.map +1 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/utils/index.cjs +10 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/utils/index.cjs.map +1 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/utils/index.js +11 -0
- package/dist/_node_modules/@nodelib/fs.scandir/out/utils/index.js.map +1 -0
- package/dist/_node_modules/@nodelib/fs.stat/out/adapters/fs.cjs +22 -0
- package/dist/_node_modules/@nodelib/fs.stat/out/adapters/fs.cjs.map +1 -0
- package/dist/_node_modules/@nodelib/fs.stat/out/adapters/fs.js +21 -0
- package/dist/_node_modules/@nodelib/fs.stat/out/adapters/fs.js.map +1 -0
- package/dist/_node_modules/@nodelib/fs.stat/out/index.cjs +35 -0
- package/dist/_node_modules/@nodelib/fs.stat/out/index.cjs.map +1 -0
- package/dist/_node_modules/@nodelib/fs.stat/out/index.js +36 -0
- package/dist/_node_modules/@nodelib/fs.stat/out/index.js.map +1 -0
- package/dist/_node_modules/@nodelib/fs.stat/out/providers/async.cjs +39 -0
- package/dist/_node_modules/@nodelib/fs.stat/out/providers/async.cjs.map +1 -0
- package/dist/_node_modules/@nodelib/fs.stat/out/providers/async.js +40 -0
- package/dist/_node_modules/@nodelib/fs.stat/out/providers/async.js.map +1 -0
- package/dist/_node_modules/@nodelib/fs.stat/out/providers/sync.cjs +25 -0
- package/dist/_node_modules/@nodelib/fs.stat/out/providers/sync.cjs.map +1 -0
- package/dist/_node_modules/@nodelib/fs.stat/out/providers/sync.js +26 -0
- package/dist/_node_modules/@nodelib/fs.stat/out/providers/sync.js.map +1 -0
- package/dist/_node_modules/@nodelib/fs.stat/out/settings.cjs +20 -0
- package/dist/_node_modules/@nodelib/fs.stat/out/settings.cjs.map +1 -0
- package/dist/_node_modules/@nodelib/fs.stat/out/settings.js +19 -0
- package/dist/_node_modules/@nodelib/fs.stat/out/settings.js.map +1 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/index.cjs +45 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/index.cjs.map +1 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/index.js +46 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/index.js.map +1 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/providers/async.cjs +34 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/providers/async.cjs.map +1 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/providers/async.js +33 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/providers/async.js.map +1 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/providers/stream.cjs +40 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/providers/stream.cjs.map +1 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/providers/stream.js +39 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/providers/stream.js.map +1 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/providers/sync.cjs +18 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/providers/sync.cjs.map +1 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/providers/sync.js +17 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/providers/sync.js.map +1 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/readers/async.cjs +108 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/readers/async.cjs.map +1 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/readers/async.js +107 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/readers/async.js.map +1 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/readers/common.cjs +31 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/readers/common.cjs.map +1 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/readers/common.js +32 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/readers/common.js.map +1 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/readers/reader.cjs +15 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/readers/reader.cjs.map +1 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/readers/reader.js +14 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/readers/reader.js.map +1 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/readers/sync.cjs +66 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/readers/sync.cjs.map +1 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/readers/sync.js +65 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/readers/sync.js.map +1 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/settings.cjs +31 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/settings.cjs.map +1 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/settings.js +30 -0
- package/dist/_node_modules/@nodelib/fs.walk/out/settings.js.map +1 -0
- package/dist/_node_modules/arrify/index.cjs +9 -0
- package/dist/_node_modules/arrify/index.cjs.map +1 -0
- package/dist/_node_modules/arrify/index.js +10 -0
- package/dist/_node_modules/arrify/index.js.map +1 -0
- package/dist/_node_modules/braces/index.cjs +63 -0
- package/dist/_node_modules/braces/index.cjs.map +1 -0
- package/dist/_node_modules/braces/index.js +64 -0
- package/dist/_node_modules/braces/index.js.map +1 -0
- package/dist/_node_modules/braces/lib/compile.cjs +50 -0
- package/dist/_node_modules/braces/lib/compile.cjs.map +1 -0
- package/dist/_node_modules/braces/lib/compile.js +51 -0
- package/dist/_node_modules/braces/lib/compile.js.map +1 -0
- package/dist/_node_modules/braces/lib/constants.cjs +97 -0
- package/dist/_node_modules/braces/lib/constants.cjs.map +1 -0
- package/dist/_node_modules/braces/lib/constants.js +98 -0
- package/dist/_node_modules/braces/lib/constants.js.map +1 -0
- package/dist/_node_modules/braces/lib/expand.cjs +97 -0
- package/dist/_node_modules/braces/lib/expand.cjs.map +1 -0
- package/dist/_node_modules/braces/lib/expand.js +98 -0
- package/dist/_node_modules/braces/lib/expand.js.map +1 -0
- package/dist/_node_modules/braces/lib/parse.cjs +240 -0
- package/dist/_node_modules/braces/lib/parse.cjs.map +1 -0
- package/dist/_node_modules/braces/lib/parse.js +241 -0
- package/dist/_node_modules/braces/lib/parse.js.map +1 -0
- package/dist/_node_modules/braces/lib/stringify.cjs +29 -0
- package/dist/_node_modules/braces/lib/stringify.cjs.map +1 -0
- package/dist/_node_modules/braces/lib/stringify.js +30 -0
- package/dist/_node_modules/braces/lib/stringify.js.map +1 -0
- package/dist/_node_modules/braces/lib/utils.cjs +83 -0
- package/dist/_node_modules/braces/lib/utils.cjs.map +1 -0
- package/dist/_node_modules/braces/lib/utils.js +84 -0
- package/dist/_node_modules/braces/lib/utils.js.map +1 -0
- package/dist/_node_modules/camelcase-keys/_node_modules/camelcase/index.cjs +83 -0
- package/dist/_node_modules/camelcase-keys/_node_modules/camelcase/index.cjs.map +1 -0
- package/dist/_node_modules/camelcase-keys/_node_modules/camelcase/index.js +84 -0
- package/dist/_node_modules/camelcase-keys/_node_modules/camelcase/index.js.map +1 -0
- package/dist/_node_modules/camelcase-keys/index.cjs +56 -0
- package/dist/_node_modules/camelcase-keys/index.cjs.map +1 -0
- package/dist/_node_modules/camelcase-keys/index.js +57 -0
- package/dist/_node_modules/camelcase-keys/index.js.map +1 -0
- package/dist/_node_modules/decamelize/index.cjs +38 -0
- package/dist/_node_modules/decamelize/index.cjs.map +1 -0
- package/dist/_node_modules/decamelize/index.js +39 -0
- package/dist/_node_modules/decamelize/index.js.map +1 -0
- package/dist/_node_modules/decamelize-keys/_node_modules/decamelize/index.cjs +10 -0
- package/dist/_node_modules/decamelize-keys/_node_modules/decamelize/index.cjs.map +1 -0
- package/dist/_node_modules/decamelize-keys/_node_modules/decamelize/index.js +11 -0
- package/dist/_node_modules/decamelize-keys/_node_modules/decamelize/index.js.map +1 -0
- package/dist/_node_modules/decamelize-keys/_node_modules/map-obj/index.cjs +13 -0
- package/dist/_node_modules/decamelize-keys/_node_modules/map-obj/index.cjs.map +1 -0
- package/dist/_node_modules/decamelize-keys/_node_modules/map-obj/index.js +14 -0
- package/dist/_node_modules/decamelize-keys/_node_modules/map-obj/index.js.map +1 -0
- package/dist/_node_modules/decamelize-keys/index.cjs +20 -0
- package/dist/_node_modules/decamelize-keys/index.cjs.map +1 -0
- package/dist/_node_modules/decamelize-keys/index.js +21 -0
- package/dist/_node_modules/decamelize-keys/index.js.map +1 -0
- package/dist/_node_modules/dir-glob/index.cjs +63 -0
- package/dist/_node_modules/dir-glob/index.cjs.map +1 -0
- package/dist/_node_modules/dir-glob/index.js +64 -0
- package/dist/_node_modules/dir-glob/index.js.map +1 -0
- package/dist/_node_modules/error-ex/index.cjs +108 -0
- package/dist/_node_modules/error-ex/index.cjs.map +1 -0
- package/dist/_node_modules/error-ex/index.js +109 -0
- package/dist/_node_modules/error-ex/index.js.map +1 -0
- package/dist/_node_modules/fast-glob/_node_modules/glob-parent/index.cjs +28 -0
- package/dist/_node_modules/fast-glob/_node_modules/glob-parent/index.cjs.map +1 -0
- package/dist/_node_modules/fast-glob/_node_modules/glob-parent/index.js +29 -0
- package/dist/_node_modules/fast-glob/_node_modules/glob-parent/index.js.map +1 -0
- package/dist/_node_modules/fast-glob/out/index.cjs +77 -0
- package/dist/_node_modules/fast-glob/out/index.cjs.map +1 -0
- package/dist/_node_modules/fast-glob/out/index.js +78 -0
- package/dist/_node_modules/fast-glob/out/index.js.map +1 -0
- package/dist/_node_modules/fast-glob/out/managers/patterns.cjs +15 -0
- package/dist/_node_modules/fast-glob/out/managers/patterns.cjs.map +1 -0
- package/dist/_node_modules/fast-glob/out/managers/patterns.js +16 -0
- package/dist/_node_modules/fast-glob/out/managers/patterns.js.map +1 -0
- package/dist/_node_modules/fast-glob/out/managers/tasks.cjs +83 -0
- package/dist/_node_modules/fast-glob/out/managers/tasks.cjs.map +1 -0
- package/dist/_node_modules/fast-glob/out/managers/tasks.js +84 -0
- package/dist/_node_modules/fast-glob/out/managers/tasks.js.map +1 -0
- package/dist/_node_modules/fast-glob/out/providers/async.cjs +29 -0
- package/dist/_node_modules/fast-glob/out/providers/async.cjs.map +1 -0
- package/dist/_node_modules/fast-glob/out/providers/async.js +28 -0
- package/dist/_node_modules/fast-glob/out/providers/async.js.map +1 -0
- package/dist/_node_modules/fast-glob/out/providers/filters/deep.cjs +65 -0
- package/dist/_node_modules/fast-glob/out/providers/filters/deep.cjs.map +1 -0
- package/dist/_node_modules/fast-glob/out/providers/filters/deep.js +64 -0
- package/dist/_node_modules/fast-glob/out/providers/filters/deep.js.map +1 -0
- package/dist/_node_modules/fast-glob/out/providers/filters/entry.cjs +65 -0
- package/dist/_node_modules/fast-glob/out/providers/filters/entry.cjs.map +1 -0
- package/dist/_node_modules/fast-glob/out/providers/filters/entry.js +64 -0
- package/dist/_node_modules/fast-glob/out/providers/filters/entry.js.map +1 -0
- package/dist/_node_modules/fast-glob/out/providers/filters/error.cjs +19 -0
- package/dist/_node_modules/fast-glob/out/providers/filters/error.cjs.map +1 -0
- package/dist/_node_modules/fast-glob/out/providers/filters/error.js +18 -0
- package/dist/_node_modules/fast-glob/out/providers/filters/error.js.map +1 -0
- package/dist/_node_modules/fast-glob/out/providers/matchers/matcher.cjs +50 -0
- package/dist/_node_modules/fast-glob/out/providers/matchers/matcher.cjs.map +1 -0
- package/dist/_node_modules/fast-glob/out/providers/matchers/matcher.js +49 -0
- package/dist/_node_modules/fast-glob/out/providers/matchers/matcher.js.map +1 -0
- package/dist/_node_modules/fast-glob/out/providers/matchers/partial.cjs +35 -0
- package/dist/_node_modules/fast-glob/out/providers/matchers/partial.cjs.map +1 -0
- package/dist/_node_modules/fast-glob/out/providers/matchers/partial.js +34 -0
- package/dist/_node_modules/fast-glob/out/providers/matchers/partial.js.map +1 -0
- package/dist/_node_modules/fast-glob/out/providers/provider.cjs +59 -0
- package/dist/_node_modules/fast-glob/out/providers/provider.cjs.map +1 -0
- package/dist/_node_modules/fast-glob/out/providers/provider.js +58 -0
- package/dist/_node_modules/fast-glob/out/providers/provider.js.map +1 -0
- package/dist/_node_modules/fast-glob/out/providers/stream.cjs +35 -0
- package/dist/_node_modules/fast-glob/out/providers/stream.cjs.map +1 -0
- package/dist/_node_modules/fast-glob/out/providers/stream.js +34 -0
- package/dist/_node_modules/fast-glob/out/providers/stream.js.map +1 -0
- package/dist/_node_modules/fast-glob/out/providers/sync.cjs +29 -0
- package/dist/_node_modules/fast-glob/out/providers/sync.cjs.map +1 -0
- package/dist/_node_modules/fast-glob/out/providers/sync.js +28 -0
- package/dist/_node_modules/fast-glob/out/providers/sync.js.map +1 -0
- package/dist/_node_modules/fast-glob/out/providers/transformers/entry.cjs +30 -0
- package/dist/_node_modules/fast-glob/out/providers/transformers/entry.cjs.map +1 -0
- package/dist/_node_modules/fast-glob/out/providers/transformers/entry.js +29 -0
- package/dist/_node_modules/fast-glob/out/providers/transformers/entry.js.map +1 -0
- package/dist/_node_modules/fast-glob/out/readers/async.cjs +41 -0
- package/dist/_node_modules/fast-glob/out/readers/async.cjs.map +1 -0
- package/dist/_node_modules/fast-glob/out/readers/async.js +40 -0
- package/dist/_node_modules/fast-glob/out/readers/async.js.map +1 -0
- package/dist/_node_modules/fast-glob/out/readers/reader.cjs +40 -0
- package/dist/_node_modules/fast-glob/out/readers/reader.cjs.map +1 -0
- package/dist/_node_modules/fast-glob/out/readers/reader.js +39 -0
- package/dist/_node_modules/fast-glob/out/readers/reader.js.map +1 -0
- package/dist/_node_modules/fast-glob/out/readers/stream.cjs +60 -0
- package/dist/_node_modules/fast-glob/out/readers/stream.cjs.map +1 -0
- package/dist/_node_modules/fast-glob/out/readers/stream.js +59 -0
- package/dist/_node_modules/fast-glob/out/readers/stream.js.map +1 -0
- package/dist/_node_modules/fast-glob/out/readers/sync.cjs +50 -0
- package/dist/_node_modules/fast-glob/out/readers/sync.cjs.map +1 -0
- package/dist/_node_modules/fast-glob/out/readers/sync.js +49 -0
- package/dist/_node_modules/fast-glob/out/readers/sync.js.map +1 -0
- package/dist/_node_modules/fast-glob/out/settings.cjs +59 -0
- package/dist/_node_modules/fast-glob/out/settings.cjs.map +1 -0
- package/dist/_node_modules/fast-glob/out/settings.js +58 -0
- package/dist/_node_modules/fast-glob/out/settings.js.map +1 -0
- package/dist/_node_modules/fast-glob/out/utils/array.cjs +24 -0
- package/dist/_node_modules/fast-glob/out/utils/array.cjs.map +1 -0
- package/dist/_node_modules/fast-glob/out/utils/array.js +25 -0
- package/dist/_node_modules/fast-glob/out/utils/array.js.map +1 -0
- package/dist/_node_modules/fast-glob/out/utils/errno.cjs +10 -0
- package/dist/_node_modules/fast-glob/out/utils/errno.cjs.map +1 -0
- package/dist/_node_modules/fast-glob/out/utils/errno.js +11 -0
- package/dist/_node_modules/fast-glob/out/utils/errno.js.map +1 -0
- package/dist/_node_modules/fast-glob/out/utils/fs.cjs +22 -0
- package/dist/_node_modules/fast-glob/out/utils/fs.cjs.map +1 -0
- package/dist/_node_modules/fast-glob/out/utils/fs.js +23 -0
- package/dist/_node_modules/fast-glob/out/utils/fs.js.map +1 -0
- package/dist/_node_modules/fast-glob/out/utils/index.cjs +34 -0
- package/dist/_node_modules/fast-glob/out/utils/index.cjs.map +1 -0
- package/dist/_node_modules/fast-glob/out/utils/index.js +35 -0
- package/dist/_node_modules/fast-glob/out/utils/index.js.map +1 -0
- package/dist/_node_modules/fast-glob/out/utils/path.cjs +32 -0
- package/dist/_node_modules/fast-glob/out/utils/path.cjs.map +1 -0
- package/dist/_node_modules/fast-glob/out/utils/path.js +33 -0
- package/dist/_node_modules/fast-glob/out/utils/path.js.map +1 -0
- package/dist/_node_modules/fast-glob/out/utils/pattern.cjs +144 -0
- package/dist/_node_modules/fast-glob/out/utils/pattern.cjs.map +1 -0
- package/dist/_node_modules/fast-glob/out/utils/pattern.js +145 -0
- package/dist/_node_modules/fast-glob/out/utils/pattern.js.map +1 -0
- package/dist/_node_modules/fast-glob/out/utils/stream.cjs +21 -0
- package/dist/_node_modules/fast-glob/out/utils/stream.cjs.map +1 -0
- package/dist/_node_modules/fast-glob/out/utils/stream.js +22 -0
- package/dist/_node_modules/fast-glob/out/utils/stream.js.map +1 -0
- package/dist/_node_modules/fast-glob/out/utils/string.cjs +14 -0
- package/dist/_node_modules/fast-glob/out/utils/string.cjs.map +1 -0
- package/dist/_node_modules/fast-glob/out/utils/string.js +15 -0
- package/dist/_node_modules/fast-glob/out/utils/string.js.map +1 -0
- package/dist/_node_modules/fastq/queue.cjs +239 -0
- package/dist/_node_modules/fastq/queue.cjs.map +1 -0
- package/dist/_node_modules/fastq/queue.js +240 -0
- package/dist/_node_modules/fastq/queue.js.map +1 -0
- package/dist/_node_modules/fill-range/index.cjs +210 -0
- package/dist/_node_modules/fill-range/index.cjs.map +1 -0
- package/dist/_node_modules/fill-range/index.js +211 -0
- package/dist/_node_modules/fill-range/index.js.map +1 -0
- package/dist/_node_modules/function-bind/implementation.cjs +46 -0
- package/dist/_node_modules/function-bind/implementation.cjs.map +1 -0
- package/dist/_node_modules/function-bind/implementation.js +47 -0
- package/dist/_node_modules/function-bind/implementation.js.map +1 -0
- package/dist/_node_modules/function-bind/index.cjs +6 -0
- package/dist/_node_modules/function-bind/index.cjs.map +1 -0
- package/dist/_node_modules/function-bind/index.js +7 -0
- package/dist/_node_modules/function-bind/index.js.map +1 -0
- package/dist/_node_modules/hard-rejection/index.cjs +22 -0
- package/dist/_node_modules/hard-rejection/index.cjs.map +1 -0
- package/dist/_node_modules/hard-rejection/index.js +23 -0
- package/dist/_node_modules/hard-rejection/index.js.map +1 -0
- package/dist/_node_modules/has/src/index.cjs +6 -0
- package/dist/_node_modules/has/src/index.cjs.map +1 -0
- package/dist/_node_modules/has/src/index.js +7 -0
- package/dist/_node_modules/has/src/index.js.map +1 -0
- package/dist/_node_modules/ignore/index.cjs +370 -0
- package/dist/_node_modules/ignore/index.cjs.map +1 -0
- package/dist/_node_modules/ignore/index.js +371 -0
- package/dist/_node_modules/ignore/index.js.map +1 -0
- package/dist/_node_modules/is-arrayish/index.cjs +9 -0
- package/dist/_node_modules/is-arrayish/index.cjs.map +1 -0
- package/dist/_node_modules/is-arrayish/index.js +10 -0
- package/dist/_node_modules/is-arrayish/index.js.map +1 -0
- package/dist/_node_modules/is-core-module/core.json.cjs +487 -0
- package/dist/_node_modules/is-core-module/core.json.cjs.map +1 -0
- package/dist/_node_modules/is-core-module/core.json.js +487 -0
- package/dist/_node_modules/is-core-module/core.json.js.map +1 -0
- package/dist/_node_modules/is-core-module/index.cjs +61 -0
- package/dist/_node_modules/is-core-module/index.cjs.map +1 -0
- package/dist/_node_modules/is-core-module/index.js +62 -0
- package/dist/_node_modules/is-core-module/index.js.map +1 -0
- package/dist/_node_modules/is-extglob/index.cjs +21 -0
- package/dist/_node_modules/is-extglob/index.cjs.map +1 -0
- package/dist/_node_modules/is-extglob/index.js +22 -0
- package/dist/_node_modules/is-extglob/index.js.map +1 -0
- package/dist/_node_modules/is-glob/index.cjs +135 -0
- package/dist/_node_modules/is-glob/index.cjs.map +1 -0
- package/dist/_node_modules/is-glob/index.js +136 -0
- package/dist/_node_modules/is-glob/index.js.map +1 -0
- package/dist/_node_modules/is-number/index.cjs +18 -0
- package/dist/_node_modules/is-number/index.cjs.map +1 -0
- package/dist/_node_modules/is-number/index.js +19 -0
- package/dist/_node_modules/is-number/index.js.map +1 -0
- package/dist/_node_modules/js-tokens/index.cjs +27 -0
- package/dist/_node_modules/js-tokens/index.cjs.map +1 -0
- package/dist/_node_modules/js-tokens/index.js +26 -0
- package/dist/_node_modules/js-tokens/index.js.map +1 -0
- package/dist/_node_modules/json-parse-even-better-errors/index.cjs +89 -0
- package/dist/_node_modules/json-parse-even-better-errors/index.cjs.map +1 -0
- package/dist/_node_modules/json-parse-even-better-errors/index.js +90 -0
- package/dist/_node_modules/json-parse-even-better-errors/index.js.map +1 -0
- package/dist/_node_modules/kind-of/index.cjs +128 -0
- package/dist/_node_modules/kind-of/index.cjs.map +1 -0
- package/dist/_node_modules/kind-of/index.js +129 -0
- package/dist/_node_modules/kind-of/index.js.map +1 -0
- package/dist/_node_modules/lines-and-columns/build/index.cjs +67 -0
- package/dist/{__node_modules → _node_modules}/lines-and-columns/build/index.cjs.map +1 -1
- package/dist/_node_modules/lines-and-columns/build/index.js +66 -0
- package/dist/{__node_modules → _node_modules}/lines-and-columns/build/index.js.map +1 -1
- package/dist/_node_modules/map-obj/index.cjs +46 -0
- package/dist/_node_modules/map-obj/index.cjs.map +1 -0
- package/dist/_node_modules/map-obj/index.js +47 -0
- package/dist/_node_modules/map-obj/index.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/find-up/index.cjs +48 -0
- package/dist/_node_modules/meow/_node_modules/find-up/index.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/find-up/index.js +48 -0
- package/dist/_node_modules/meow/_node_modules/find-up/index.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/hosted-git-info/lib/git-host-info.cjs +165 -0
- package/dist/_node_modules/meow/_node_modules/hosted-git-info/lib/git-host-info.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/hosted-git-info/lib/git-host-info.js +166 -0
- package/dist/_node_modules/meow/_node_modules/hosted-git-info/lib/git-host-info.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/hosted-git-info/lib/git-host.cjs +90 -0
- package/dist/_node_modules/meow/_node_modules/hosted-git-info/lib/git-host.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/hosted-git-info/lib/git-host.js +91 -0
- package/dist/_node_modules/meow/_node_modules/hosted-git-info/lib/git-host.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/hosted-git-info/lib/index.cjs +124 -0
- package/dist/_node_modules/meow/_node_modules/hosted-git-info/lib/index.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/hosted-git-info/lib/index.js +123 -0
- package/dist/_node_modules/meow/_node_modules/hosted-git-info/lib/index.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/hosted-git-info/lib/parse-url.cjs +50 -0
- package/dist/_node_modules/meow/_node_modules/hosted-git-info/lib/parse-url.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/hosted-git-info/lib/parse-url.js +51 -0
- package/dist/_node_modules/meow/_node_modules/hosted-git-info/lib/parse-url.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/indent-string/index.cjs +34 -0
- package/dist/_node_modules/meow/_node_modules/indent-string/index.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/indent-string/index.js +35 -0
- package/dist/_node_modules/meow/_node_modules/indent-string/index.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/locate-path/index.cjs +43 -0
- package/dist/_node_modules/meow/_node_modules/locate-path/index.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/locate-path/index.js +43 -0
- package/dist/_node_modules/meow/_node_modules/locate-path/index.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/lru-cache/index.cjs +1014 -0
- package/dist/_node_modules/meow/_node_modules/lru-cache/index.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/lru-cache/index.js +1015 -0
- package/dist/_node_modules/meow/_node_modules/lru-cache/index.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/lib/extract_description.cjs +23 -0
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/lib/extract_description.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/lib/extract_description.js +24 -0
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/lib/extract_description.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/lib/fixer.cjs +438 -0
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/lib/fixer.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/lib/fixer.js +439 -0
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/lib/fixer.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/lib/make_warning.cjs +25 -0
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/lib/make_warning.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/lib/make_warning.js +26 -0
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/lib/make_warning.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/lib/normalize.cjs +56 -0
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/lib/normalize.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/lib/normalize.js +57 -0
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/lib/normalize.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/lib/typos.json.cjs +41 -0
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/lib/typos.json.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/lib/typos.json.js +41 -0
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/lib/typos.json.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/lib/warning_messages.json.cjs +90 -0
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/lib/warning_messages.json.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/lib/warning_messages.json.js +90 -0
- package/dist/_node_modules/meow/_node_modules/normalize-package-data/lib/warning_messages.json.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/hosted-git-info/git-host-info.cjs +158 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/hosted-git-info/git-host-info.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/hosted-git-info/git-host-info.js +159 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/hosted-git-info/git-host-info.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/hosted-git-info/git-host.cjs +87 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/hosted-git-info/git-host.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/hosted-git-info/git-host.js +88 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/hosted-git-info/git-host.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/hosted-git-info/index.cjs +179 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/hosted-git-info/index.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/hosted-git-info/index.js +178 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/hosted-git-info/index.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/lru-cache/index.cjs +267 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/lru-cache/index.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/lru-cache/index.js +268 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/lru-cache/index.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/extract_description.cjs +19 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/extract_description.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/extract_description.js +20 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/extract_description.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/fixer.cjs +438 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/fixer.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/fixer.js +439 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/fixer.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/make_warning.cjs +25 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/make_warning.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/make_warning.js +26 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/make_warning.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/normalize.cjs +56 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/normalize.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/normalize.js +57 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/normalize.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/typos.json.cjs +41 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/typos.json.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/typos.json.js +41 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/typos.json.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/warning_messages.json.cjs +90 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/warning_messages.json.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/warning_messages.json.js +90 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/warning_messages.json.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/index.cjs +20 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/index.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/index.js +20 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg/index.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg-up/index.cjs +17 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg-up/index.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg-up/index.js +17 -0
- package/dist/_node_modules/meow/_node_modules/read-pkg-up/index.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/redent/index.cjs +8 -0
- package/dist/_node_modules/meow/_node_modules/redent/index.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/redent/index.js +9 -0
- package/dist/_node_modules/meow/_node_modules/redent/index.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/strip-indent/index.cjs +12 -0
- package/dist/_node_modules/meow/_node_modules/strip-indent/index.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/strip-indent/index.js +13 -0
- package/dist/_node_modules/meow/_node_modules/strip-indent/index.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/yallist/iterator.cjs +19 -0
- package/dist/_node_modules/meow/_node_modules/yallist/iterator.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/yallist/iterator.js +19 -0
- package/dist/_node_modules/meow/_node_modules/yallist/iterator.js.map +1 -0
- package/dist/_node_modules/meow/_node_modules/yallist/yallist.cjs +366 -0
- package/dist/_node_modules/meow/_node_modules/yallist/yallist.cjs.map +1 -0
- package/dist/_node_modules/meow/_node_modules/yallist/yallist.js +367 -0
- package/dist/_node_modules/meow/_node_modules/yallist/yallist.js.map +1 -0
- package/dist/{__node_modules/meow/__node_modules → _node_modules/meow/_node_modules}/yargs-parser/build/lib/index.cjs.map +1 -1
- package/dist/{__node_modules/meow/__node_modules → _node_modules/meow/_node_modules}/yargs-parser/build/lib/index.js.map +1 -1
- package/dist/{__node_modules/meow/__node_modules → _node_modules/meow/_node_modules}/yargs-parser/build/lib/string-utils.cjs.map +1 -1
- package/dist/{__node_modules/meow/__node_modules → _node_modules/meow/_node_modules}/yargs-parser/build/lib/string-utils.js.map +1 -1
- package/dist/{__node_modules/meow/__node_modules → _node_modules/meow/_node_modules}/yargs-parser/build/lib/tokenize-arg-string.cjs.map +1 -1
- package/dist/{__node_modules/meow/__node_modules → _node_modules/meow/_node_modules}/yargs-parser/build/lib/tokenize-arg-string.js.map +1 -1
- package/dist/{__node_modules/meow/__node_modules → _node_modules/meow/_node_modules}/yargs-parser/build/lib/yargs-parser-types.cjs.map +1 -1
- package/dist/{__node_modules/meow/__node_modules → _node_modules/meow/_node_modules}/yargs-parser/build/lib/yargs-parser-types.js.map +1 -1
- package/dist/{__node_modules/meow/__node_modules → _node_modules/meow/_node_modules}/yargs-parser/build/lib/yargs-parser.cjs.map +1 -1
- package/dist/{__node_modules/meow/__node_modules → _node_modules/meow/_node_modules}/yargs-parser/build/lib/yargs-parser.js.map +1 -1
- package/dist/_node_modules/meow/index.cjs +202 -0
- package/dist/_node_modules/meow/index.cjs.map +1 -0
- package/dist/_node_modules/meow/index.js +203 -0
- package/dist/_node_modules/meow/index.js.map +1 -0
- package/dist/_node_modules/merge2/index.cjs +116 -0
- package/dist/_node_modules/merge2/index.cjs.map +1 -0
- package/dist/_node_modules/merge2/index.js +117 -0
- package/dist/_node_modules/merge2/index.js.map +1 -0
- package/dist/_node_modules/micromatch/index.cjs +164 -0
- package/dist/_node_modules/micromatch/index.cjs.map +1 -0
- package/dist/_node_modules/micromatch/index.js +165 -0
- package/dist/_node_modules/micromatch/index.js.map +1 -0
- package/dist/_node_modules/min-indent/index.cjs +10 -0
- package/dist/_node_modules/min-indent/index.cjs.map +1 -0
- package/dist/_node_modules/min-indent/index.js +11 -0
- package/dist/_node_modules/min-indent/index.js.map +1 -0
- package/dist/_node_modules/minimist-options/_node_modules/is-plain-obj/index.cjs +8 -0
- package/dist/_node_modules/minimist-options/_node_modules/is-plain-obj/index.cjs.map +1 -0
- package/dist/_node_modules/minimist-options/_node_modules/is-plain-obj/index.js +9 -0
- package/dist/_node_modules/minimist-options/_node_modules/is-plain-obj/index.js.map +1 -0
- package/dist/_node_modules/minimist-options/index.cjs +91 -0
- package/dist/_node_modules/minimist-options/index.cjs.map +1 -0
- package/dist/_node_modules/minimist-options/index.js +92 -0
- package/dist/_node_modules/minimist-options/index.js.map +1 -0
- package/dist/_node_modules/parse-json/index.cjs +52 -0
- package/dist/_node_modules/parse-json/index.cjs.map +1 -0
- package/dist/_node_modules/parse-json/index.js +53 -0
- package/dist/_node_modules/parse-json/index.js.map +1 -0
- package/dist/_node_modules/path-type/index.cjs +41 -0
- package/dist/_node_modules/path-type/index.cjs.map +1 -0
- package/dist/_node_modules/path-type/index.js +42 -0
- package/dist/_node_modules/path-type/index.js.map +1 -0
- package/dist/_node_modules/picomatch/index.cjs +7 -0
- package/dist/_node_modules/picomatch/index.cjs.map +1 -0
- package/dist/_node_modules/picomatch/index.js +6 -0
- package/dist/_node_modules/picomatch/index.js.map +1 -0
- package/dist/_node_modules/picomatch/lib/constants.cjs +194 -0
- package/dist/_node_modules/picomatch/lib/constants.cjs.map +1 -0
- package/dist/_node_modules/picomatch/lib/constants.js +195 -0
- package/dist/_node_modules/picomatch/lib/constants.js.map +1 -0
- package/dist/_node_modules/picomatch/lib/parse.cjs +780 -0
- package/dist/_node_modules/picomatch/lib/parse.cjs.map +1 -0
- package/dist/_node_modules/picomatch/lib/parse.js +781 -0
- package/dist/_node_modules/picomatch/lib/parse.js.map +1 -0
- package/dist/_node_modules/picomatch/lib/picomatch.cjs +146 -0
- package/dist/_node_modules/picomatch/lib/picomatch.cjs.map +1 -0
- package/dist/_node_modules/picomatch/lib/picomatch.js +147 -0
- package/dist/_node_modules/picomatch/lib/picomatch.js.map +1 -0
- package/dist/_node_modules/picomatch/lib/scan.cjs +332 -0
- package/dist/_node_modules/picomatch/lib/scan.cjs.map +1 -0
- package/dist/_node_modules/picomatch/lib/scan.js +333 -0
- package/dist/_node_modules/picomatch/lib/scan.js.map +1 -0
- package/dist/_node_modules/picomatch/lib/utils.cjs +64 -0
- package/dist/_node_modules/picomatch/lib/utils.cjs.map +1 -0
- package/dist/_node_modules/picomatch/lib/utils.js +65 -0
- package/dist/_node_modules/picomatch/lib/utils.js.map +1 -0
- package/dist/_node_modules/queue-microtask/index.cjs +9 -0
- package/dist/_node_modules/queue-microtask/index.cjs.map +1 -0
- package/dist/_node_modules/queue-microtask/index.js +10 -0
- package/dist/_node_modules/queue-microtask/index.js.map +1 -0
- package/dist/_node_modules/quick-lru/index.cjs +234 -0
- package/dist/_node_modules/quick-lru/index.cjs.map +1 -0
- package/dist/_node_modules/quick-lru/index.js +235 -0
- package/dist/_node_modules/quick-lru/index.js.map +1 -0
- package/dist/_node_modules/reusify/reusify.cjs +27 -0
- package/dist/_node_modules/reusify/reusify.cjs.map +1 -0
- package/dist/_node_modules/reusify/reusify.js +28 -0
- package/dist/_node_modules/reusify/reusify.js.map +1 -0
- package/dist/_node_modules/run-parallel/index.cjs +52 -0
- package/dist/_node_modules/run-parallel/index.cjs.map +1 -0
- package/dist/_node_modules/run-parallel/index.js +53 -0
- package/dist/_node_modules/run-parallel/index.js.map +1 -0
- package/dist/_node_modules/spdx-correct/index.cjs +333 -0
- package/dist/_node_modules/spdx-correct/index.cjs.map +1 -0
- package/dist/_node_modules/spdx-correct/index.js +334 -0
- package/dist/_node_modules/spdx-correct/index.js.map +1 -0
- package/dist/_node_modules/spdx-exceptions/index.json.cjs +43 -0
- package/dist/_node_modules/spdx-exceptions/index.json.cjs.map +1 -0
- package/dist/_node_modules/spdx-exceptions/index.json.js +44 -0
- package/dist/_node_modules/spdx-exceptions/index.json.js.map +1 -0
- package/dist/_node_modules/spdx-expression-parse/index.cjs +10 -0
- package/dist/_node_modules/spdx-expression-parse/index.cjs.map +1 -0
- package/dist/_node_modules/spdx-expression-parse/index.js +11 -0
- package/dist/_node_modules/spdx-expression-parse/index.js.map +1 -0
- package/dist/_node_modules/spdx-expression-parse/parse.cjs +110 -0
- package/dist/_node_modules/spdx-expression-parse/parse.cjs.map +1 -0
- package/dist/_node_modules/spdx-expression-parse/parse.js +111 -0
- package/dist/_node_modules/spdx-expression-parse/parse.js.map +1 -0
- package/dist/_node_modules/spdx-expression-parse/scan.cjs +103 -0
- package/dist/_node_modules/spdx-expression-parse/scan.cjs.map +1 -0
- package/dist/_node_modules/spdx-expression-parse/scan.js +104 -0
- package/dist/_node_modules/spdx-expression-parse/scan.js.map +1 -0
- package/dist/_node_modules/spdx-license-ids/deprecated.json.cjs +30 -0
- package/dist/_node_modules/spdx-license-ids/deprecated.json.cjs.map +1 -0
- package/dist/_node_modules/spdx-license-ids/deprecated.json.js +31 -0
- package/dist/_node_modules/spdx-license-ids/deprecated.json.js.map +1 -0
- package/dist/_node_modules/spdx-license-ids/index.json.cjs +510 -0
- package/dist/_node_modules/spdx-license-ids/index.json.cjs.map +1 -0
- package/dist/_node_modules/spdx-license-ids/index.json.js +511 -0
- package/dist/_node_modules/spdx-license-ids/index.json.js.map +1 -0
- package/dist/_node_modules/to-regex-range/index.cjs +215 -0
- package/dist/_node_modules/to-regex-range/index.cjs.map +1 -0
- package/dist/_node_modules/to-regex-range/index.js +216 -0
- package/dist/_node_modules/to-regex-range/index.js.map +1 -0
- package/dist/_node_modules/trim-newlines/index.cjs +29 -0
- package/dist/_node_modules/trim-newlines/index.cjs.map +1 -0
- package/dist/_node_modules/trim-newlines/index.js +30 -0
- package/dist/_node_modules/trim-newlines/index.js.map +1 -0
- package/dist/_node_modules/validate-npm-package-license/index.cjs +70 -0
- package/dist/_node_modules/validate-npm-package-license/index.cjs.map +1 -0
- package/dist/_node_modules/validate-npm-package-license/index.js +71 -0
- package/dist/_node_modules/validate-npm-package-license/index.js.map +1 -0
- package/dist/_virtual/_commonjsHelpers.cjs +5 -0
- package/dist/_virtual/_commonjsHelpers.cjs.map +1 -0
- package/dist/_virtual/_commonjsHelpers.js +5 -0
- package/dist/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/_virtual/array.cjs +5 -0
- package/dist/_virtual/array.cjs.map +1 -0
- package/dist/_virtual/array.js +5 -0
- package/dist/_virtual/array.js.map +1 -0
- package/dist/_virtual/async.cjs +5 -0
- package/dist/_virtual/async.cjs.map +1 -0
- package/dist/_virtual/async.js +5 -0
- package/dist/_virtual/async.js.map +1 -0
- package/dist/_virtual/async2.cjs +5 -0
- package/dist/_virtual/async2.cjs.map +1 -0
- package/dist/_virtual/async2.js +5 -0
- package/dist/_virtual/async2.js.map +1 -0
- package/dist/_virtual/async3.cjs +5 -0
- package/dist/_virtual/async3.cjs.map +1 -0
- package/dist/_virtual/async3.js +5 -0
- package/dist/_virtual/async3.js.map +1 -0
- package/dist/_virtual/async4.cjs +5 -0
- package/dist/_virtual/async4.cjs.map +1 -0
- package/dist/_virtual/async4.js +5 -0
- package/dist/_virtual/async4.js.map +1 -0
- package/dist/_virtual/async5.cjs +5 -0
- package/dist/_virtual/async5.cjs.map +1 -0
- package/dist/_virtual/async5.js +5 -0
- package/dist/_virtual/async5.js.map +1 -0
- package/dist/_virtual/async6.cjs +5 -0
- package/dist/_virtual/async6.cjs.map +1 -0
- package/dist/_virtual/async6.js +5 -0
- package/dist/_virtual/async6.js.map +1 -0
- package/dist/_virtual/common.cjs +5 -0
- package/dist/_virtual/common.cjs.map +1 -0
- package/dist/_virtual/common.js +5 -0
- package/dist/_virtual/common.js.map +1 -0
- package/dist/_virtual/common2.cjs +5 -0
- package/dist/_virtual/common2.cjs.map +1 -0
- package/dist/_virtual/common2.js +5 -0
- package/dist/_virtual/common2.js.map +1 -0
- package/dist/_virtual/constants.cjs +5 -0
- package/dist/_virtual/constants.cjs.map +1 -0
- package/dist/_virtual/constants.js +5 -0
- package/dist/_virtual/constants.js.map +1 -0
- package/dist/_virtual/deep.cjs +5 -0
- package/dist/_virtual/deep.cjs.map +1 -0
- package/dist/_virtual/deep.js +5 -0
- package/dist/_virtual/deep.js.map +1 -0
- package/dist/_virtual/entry.cjs +5 -0
- package/dist/_virtual/entry.cjs.map +1 -0
- package/dist/_virtual/entry.js +5 -0
- package/dist/_virtual/entry.js.map +1 -0
- package/dist/_virtual/entry2.cjs +5 -0
- package/dist/_virtual/entry2.cjs.map +1 -0
- package/dist/_virtual/entry2.js +5 -0
- package/dist/_virtual/entry2.js.map +1 -0
- package/dist/_virtual/errno.cjs +5 -0
- package/dist/_virtual/errno.cjs.map +1 -0
- package/dist/_virtual/errno.js +5 -0
- package/dist/_virtual/errno.js.map +1 -0
- package/dist/_virtual/error.cjs +5 -0
- package/dist/_virtual/error.cjs.map +1 -0
- package/dist/_virtual/error.js +5 -0
- package/dist/_virtual/error.js.map +1 -0
- package/dist/_virtual/fs.cjs +5 -0
- package/dist/_virtual/fs.cjs.map +1 -0
- package/dist/_virtual/fs.js +5 -0
- package/dist/_virtual/fs.js.map +1 -0
- package/dist/_virtual/fs2.cjs +5 -0
- package/dist/_virtual/fs2.cjs.map +1 -0
- package/dist/_virtual/fs2.js +5 -0
- package/dist/_virtual/fs2.js.map +1 -0
- package/dist/_virtual/fs3.cjs +5 -0
- package/dist/_virtual/fs3.cjs.map +1 -0
- package/dist/_virtual/fs3.js +5 -0
- package/dist/_virtual/fs3.js.map +1 -0
- package/dist/_virtual/fs4.cjs +5 -0
- package/dist/_virtual/fs4.cjs.map +1 -0
- package/dist/_virtual/fs4.js +5 -0
- package/dist/_virtual/fs4.js.map +1 -0
- package/dist/_virtual/identifier.cjs +5 -0
- package/dist/_virtual/identifier.cjs.map +1 -0
- package/dist/_virtual/identifier.js +5 -0
- package/dist/_virtual/identifier.js.map +1 -0
- package/dist/_virtual/index.cjs +13 -0
- package/dist/_virtual/index.cjs.map +1 -0
- package/dist/_virtual/index.js +14 -0
- package/dist/_virtual/index.js.map +1 -0
- package/dist/_virtual/index10.cjs +5 -0
- package/dist/_virtual/index10.cjs.map +1 -0
- package/dist/_virtual/index10.js +5 -0
- package/dist/_virtual/index10.js.map +1 -0
- package/dist/_virtual/index11.cjs +5 -0
- package/dist/_virtual/index11.cjs.map +1 -0
- package/dist/_virtual/index11.js +5 -0
- package/dist/_virtual/index11.js.map +1 -0
- package/dist/_virtual/index12.cjs +13 -0
- package/dist/_virtual/index12.cjs.map +1 -0
- package/dist/_virtual/index12.js +14 -0
- package/dist/_virtual/index12.js.map +1 -0
- package/dist/_virtual/index13.cjs +5 -0
- package/dist/_virtual/index13.cjs.map +1 -0
- package/dist/_virtual/index13.js +5 -0
- package/dist/_virtual/index13.js.map +1 -0
- package/dist/_virtual/index14.cjs +13 -0
- package/dist/_virtual/index14.cjs.map +1 -0
- package/dist/_virtual/index14.js +14 -0
- package/dist/_virtual/index14.js.map +1 -0
- package/dist/_virtual/index15.cjs +5 -0
- package/dist/_virtual/index15.cjs.map +1 -0
- package/dist/_virtual/index15.js +5 -0
- package/dist/_virtual/index15.js.map +1 -0
- package/dist/_virtual/index16.cjs +5 -0
- package/dist/_virtual/index16.cjs.map +1 -0
- package/dist/_virtual/index16.js +5 -0
- package/dist/_virtual/index16.js.map +1 -0
- package/dist/_virtual/index17.cjs +5 -0
- package/dist/_virtual/index17.cjs.map +1 -0
- package/dist/_virtual/index17.js +5 -0
- package/dist/_virtual/index17.js.map +1 -0
- package/dist/_virtual/index18.cjs +5 -0
- package/dist/_virtual/index18.cjs.map +1 -0
- package/dist/_virtual/index18.js +5 -0
- package/dist/_virtual/index18.js.map +1 -0
- package/dist/_virtual/index2.cjs +13 -0
- package/dist/_virtual/index2.cjs.map +1 -0
- package/dist/_virtual/index2.js +14 -0
- package/dist/_virtual/index2.js.map +1 -0
- package/dist/_virtual/index3.cjs +13 -0
- package/dist/_virtual/index3.cjs.map +1 -0
- package/dist/_virtual/index3.js +14 -0
- package/dist/_virtual/index3.js.map +1 -0
- package/dist/_virtual/index4.cjs +13 -0
- package/dist/_virtual/index4.cjs.map +1 -0
- package/dist/_virtual/index4.js +14 -0
- package/dist/_virtual/index4.js.map +1 -0
- package/dist/_virtual/index5.cjs +5 -0
- package/dist/_virtual/index5.cjs.map +1 -0
- package/dist/_virtual/index5.js +5 -0
- package/dist/_virtual/index5.js.map +1 -0
- package/dist/_virtual/index6.cjs +5 -0
- package/dist/_virtual/index6.cjs.map +1 -0
- package/dist/_virtual/index6.js +5 -0
- package/dist/_virtual/index6.js.map +1 -0
- package/dist/_virtual/index7.cjs +13 -0
- package/dist/_virtual/index7.cjs.map +1 -0
- package/dist/_virtual/index7.js +14 -0
- package/dist/_virtual/index7.js.map +1 -0
- package/dist/_virtual/index8.cjs +5 -0
- package/dist/_virtual/index8.cjs.map +1 -0
- package/dist/_virtual/index8.js +5 -0
- package/dist/_virtual/index8.js.map +1 -0
- package/dist/_virtual/index9.cjs +5 -0
- package/dist/_virtual/index9.cjs.map +1 -0
- package/dist/_virtual/index9.js +5 -0
- package/dist/_virtual/index9.js.map +1 -0
- package/dist/_virtual/keyword.cjs +5 -0
- package/dist/_virtual/keyword.cjs.map +1 -0
- package/dist/_virtual/keyword.js +5 -0
- package/dist/_virtual/keyword.js.map +1 -0
- package/dist/_virtual/matcher.cjs +5 -0
- package/dist/_virtual/matcher.cjs.map +1 -0
- package/dist/_virtual/matcher.js +5 -0
- package/dist/_virtual/matcher.js.map +1 -0
- package/dist/_virtual/partial.cjs +5 -0
- package/dist/_virtual/partial.cjs.map +1 -0
- package/dist/_virtual/partial.js +5 -0
- package/dist/_virtual/partial.js.map +1 -0
- package/dist/_virtual/path.cjs +5 -0
- package/dist/_virtual/path.cjs.map +1 -0
- package/dist/_virtual/path.js +5 -0
- package/dist/_virtual/path.js.map +1 -0
- package/dist/_virtual/pattern.cjs +5 -0
- package/dist/_virtual/pattern.cjs.map +1 -0
- package/dist/_virtual/pattern.js +5 -0
- package/dist/_virtual/pattern.js.map +1 -0
- package/dist/_virtual/patterns.cjs +5 -0
- package/dist/_virtual/patterns.cjs.map +1 -0
- package/dist/_virtual/patterns.js +5 -0
- package/dist/_virtual/patterns.js.map +1 -0
- package/dist/_virtual/provider.cjs +5 -0
- package/dist/_virtual/provider.cjs.map +1 -0
- package/dist/_virtual/provider.js +5 -0
- package/dist/_virtual/provider.js.map +1 -0
- package/dist/_virtual/queue.cjs +13 -0
- package/dist/_virtual/queue.cjs.map +1 -0
- package/dist/_virtual/queue.js +14 -0
- package/dist/_virtual/queue.js.map +1 -0
- package/dist/_virtual/reader.cjs +5 -0
- package/dist/_virtual/reader.cjs.map +1 -0
- package/dist/_virtual/reader.js +5 -0
- package/dist/_virtual/reader.js.map +1 -0
- package/dist/_virtual/reader2.cjs +5 -0
- package/dist/_virtual/reader2.cjs.map +1 -0
- package/dist/_virtual/reader2.js +5 -0
- package/dist/_virtual/reader2.js.map +1 -0
- package/dist/_virtual/settings.cjs +5 -0
- package/dist/_virtual/settings.cjs.map +1 -0
- package/dist/_virtual/settings.js +5 -0
- package/dist/_virtual/settings.js.map +1 -0
- package/dist/_virtual/settings2.cjs +5 -0
- package/dist/_virtual/settings2.cjs.map +1 -0
- package/dist/_virtual/settings2.js +5 -0
- package/dist/_virtual/settings2.js.map +1 -0
- package/dist/_virtual/settings3.cjs +5 -0
- package/dist/_virtual/settings3.cjs.map +1 -0
- package/dist/_virtual/settings3.js +5 -0
- package/dist/_virtual/settings3.js.map +1 -0
- package/dist/_virtual/settings4.cjs +5 -0
- package/dist/_virtual/settings4.cjs.map +1 -0
- package/dist/_virtual/settings4.js +5 -0
- package/dist/_virtual/settings4.js.map +1 -0
- package/dist/_virtual/stream.cjs +5 -0
- package/dist/_virtual/stream.cjs.map +1 -0
- package/dist/_virtual/stream.js +5 -0
- package/dist/_virtual/stream.js.map +1 -0
- package/dist/_virtual/stream2.cjs +5 -0
- package/dist/_virtual/stream2.cjs.map +1 -0
- package/dist/_virtual/stream2.js +5 -0
- package/dist/_virtual/stream2.js.map +1 -0
- package/dist/_virtual/stream3.cjs +5 -0
- package/dist/_virtual/stream3.cjs.map +1 -0
- package/dist/_virtual/stream3.js +5 -0
- package/dist/_virtual/stream3.js.map +1 -0
- package/dist/_virtual/stream4.cjs +5 -0
- package/dist/_virtual/stream4.cjs.map +1 -0
- package/dist/_virtual/stream4.js +5 -0
- package/dist/_virtual/stream4.js.map +1 -0
- package/dist/_virtual/string.cjs +5 -0
- package/dist/_virtual/string.cjs.map +1 -0
- package/dist/_virtual/string.js +5 -0
- package/dist/_virtual/string.js.map +1 -0
- package/dist/_virtual/sync.cjs +5 -0
- package/dist/_virtual/sync.cjs.map +1 -0
- package/dist/_virtual/sync.js +5 -0
- package/dist/_virtual/sync.js.map +1 -0
- package/dist/_virtual/sync2.cjs +5 -0
- package/dist/_virtual/sync2.cjs.map +1 -0
- package/dist/_virtual/sync2.js +5 -0
- package/dist/_virtual/sync2.js.map +1 -0
- package/dist/_virtual/sync3.cjs +5 -0
- package/dist/_virtual/sync3.cjs.map +1 -0
- package/dist/_virtual/sync3.js +5 -0
- package/dist/_virtual/sync3.js.map +1 -0
- package/dist/_virtual/sync4.cjs +5 -0
- package/dist/_virtual/sync4.cjs.map +1 -0
- package/dist/_virtual/sync4.js +5 -0
- package/dist/_virtual/sync4.js.map +1 -0
- package/dist/_virtual/sync5.cjs +5 -0
- package/dist/_virtual/sync5.cjs.map +1 -0
- package/dist/_virtual/sync5.js +5 -0
- package/dist/_virtual/sync5.js.map +1 -0
- package/dist/_virtual/sync6.cjs +5 -0
- package/dist/_virtual/sync6.cjs.map +1 -0
- package/dist/_virtual/sync6.js +5 -0
- package/dist/_virtual/sync6.js.map +1 -0
- package/dist/_virtual/tasks.cjs +5 -0
- package/dist/_virtual/tasks.cjs.map +1 -0
- package/dist/_virtual/tasks.js +5 -0
- package/dist/_virtual/tasks.js.map +1 -0
- package/dist/_virtual/utils.cjs +5 -0
- package/dist/_virtual/utils.cjs.map +1 -0
- package/dist/_virtual/utils.js +5 -0
- package/dist/_virtual/utils.js.map +1 -0
- package/dist/_virtual/utils2.cjs +5 -0
- package/dist/_virtual/utils2.cjs.map +1 -0
- package/dist/_virtual/utils2.js +5 -0
- package/dist/_virtual/utils2.js.map +1 -0
- package/dist/cli.cjs +78 -0
- package/dist/cli.cjs.map +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +77 -0
- package/dist/cli.js.map +1 -0
- package/dist/constants.cjs +7 -0
- package/dist/constants.cjs.map +1 -0
- package/dist/constants.d.ts +2 -0
- package/dist/constants.js +7 -0
- package/dist/constants.js.map +1 -0
- package/dist/index.cjs +6 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/assertExists.cjs +9 -0
- package/dist/lib/assertExists.cjs.map +1 -0
- package/dist/lib/assertExists.d.ts +1 -0
- package/dist/lib/assertExists.js +9 -0
- package/dist/lib/assertExists.js.map +1 -0
- package/dist/lib/framework.cjs +92 -0
- package/dist/lib/framework.cjs.map +1 -0
- package/dist/lib/framework.d.ts +45 -0
- package/dist/lib/framework.js +92 -0
- package/dist/lib/framework.js.map +1 -0
- package/dist/lib/getExecuteCommand.cjs +8 -0
- package/dist/lib/getExecuteCommand.cjs.map +1 -0
- package/dist/lib/getExecuteCommand.d.ts +5 -0
- package/dist/lib/getExecuteCommand.js +8 -0
- package/dist/lib/getExecuteCommand.js.map +1 -0
- package/dist/lib/getRunScriptCommand.cjs +8 -0
- package/dist/lib/getRunScriptCommand.cjs.map +1 -0
- package/dist/lib/getRunScriptCommand.d.ts +5 -0
- package/dist/lib/getRunScriptCommand.js +8 -0
- package/dist/lib/getRunScriptCommand.js.map +1 -0
- package/dist/lib/listr.cjs +13 -0
- package/dist/lib/listr.cjs.map +1 -0
- package/dist/lib/listr.d.ts +3 -0
- package/dist/lib/listr.js +13 -0
- package/dist/lib/listr.js.map +1 -0
- package/dist/lib/prompt.cjs +15 -0
- package/dist/lib/prompt.cjs.map +1 -0
- package/dist/lib/prompt.d.ts +10 -0
- package/dist/lib/prompt.js +15 -0
- package/dist/lib/prompt.js.map +1 -0
- package/dist/lib/repositoryDomain.cjs +130 -0
- package/dist/lib/repositoryDomain.cjs.map +1 -0
- package/dist/lib/repositoryDomain.d.ts +25 -0
- package/dist/lib/repositoryDomain.js +130 -0
- package/dist/lib/repositoryDomain.js.map +1 -0
- package/dist/packages/init/_node_modules/globby/ignore.cjs +62 -0
- package/dist/packages/init/_node_modules/globby/ignore.cjs.map +1 -0
- package/dist/packages/init/_node_modules/globby/ignore.js +62 -0
- package/dist/packages/init/_node_modules/globby/ignore.js.map +1 -0
- package/dist/packages/init/_node_modules/globby/index.cjs +137 -0
- package/dist/packages/init/_node_modules/globby/index.cjs.map +1 -0
- package/dist/packages/init/_node_modules/globby/index.js +137 -0
- package/dist/packages/init/_node_modules/globby/index.js.map +1 -0
- package/dist/packages/init/_node_modules/globby/utilities.cjs +9 -0
- package/dist/packages/init/_node_modules/globby/utilities.cjs.map +1 -0
- package/dist/packages/init/_node_modules/globby/utilities.js +9 -0
- package/dist/packages/init/_node_modules/globby/utilities.js.map +1 -0
- package/dist/packages/init/_node_modules/slash/index.cjs +11 -0
- package/dist/packages/init/_node_modules/slash/index.cjs.map +1 -0
- package/dist/packages/init/_node_modules/slash/index.js +12 -0
- package/dist/packages/init/_node_modules/slash/index.js.map +1 -0
- package/dist/packages/init/package.json.cjs +135 -0
- package/dist/packages/init/package.json.cjs.map +1 -0
- package/dist/packages/init/package.json.js +135 -0
- package/dist/packages/init/package.json.js.map +1 -0
- package/package.json +93 -69
- package/src/SliceMachineInitProcess.ts +1114 -0
- package/src/cli.ts +84 -0
- package/src/constants.ts +3 -0
- package/src/index.ts +5 -129
- package/src/lib/assertExists.ts +9 -0
- package/src/lib/framework.ts +155 -0
- package/src/lib/getExecuteCommand.ts +9 -0
- package/src/lib/getRunScriptCommand.ts +9 -0
- package/src/lib/listr.ts +15 -0
- package/src/lib/prompt.ts +27 -0
- package/src/lib/repositoryDomain.ts +219 -0
- package/.depcheckrc +0 -4
- package/.eslintignore +0 -3
- package/.eslintrc.js +0 -24
- package/build/index.js +0 -3388
- package/build/index.js.map +0 -1
- package/dist/__node_modules/lines-and-columns/build/index.cjs +0 -64
- package/dist/__node_modules/lines-and-columns/build/index.js +0 -63
- package/dist/packages/init/__node_modules/human-signals/build/src/core.cjs +0 -275
- package/dist/packages/init/__node_modules/human-signals/build/src/core.cjs.map +0 -1
- package/dist/packages/init/__node_modules/human-signals/build/src/core.js +0 -275
- package/dist/packages/init/__node_modules/human-signals/build/src/core.js.map +0 -1
- package/dist/packages/init/__node_modules/human-signals/build/src/main.cjs +0 -50
- package/dist/packages/init/__node_modules/human-signals/build/src/main.cjs.map +0 -1
- package/dist/packages/init/__node_modules/human-signals/build/src/main.js +0 -50
- package/dist/packages/init/__node_modules/human-signals/build/src/main.js.map +0 -1
- package/dist/packages/init/__node_modules/human-signals/build/src/realtime.cjs +0 -20
- package/dist/packages/init/__node_modules/human-signals/build/src/realtime.cjs.map +0 -1
- package/dist/packages/init/__node_modules/human-signals/build/src/realtime.js +0 -20
- package/dist/packages/init/__node_modules/human-signals/build/src/realtime.js.map +0 -1
- package/dist/packages/init/__node_modules/human-signals/build/src/signals.cjs +0 -27
- package/dist/packages/init/__node_modules/human-signals/build/src/signals.cjs.map +0 -1
- package/dist/packages/init/__node_modules/human-signals/build/src/signals.js +0 -27
- package/dist/packages/init/__node_modules/human-signals/build/src/signals.js.map +0 -1
- package/jest.config.js +0 -17
- package/siroc.config.js +0 -19
- package/src/steps/choose-or-create-a-repository.ts +0 -169
- package/src/steps/configure-project.ts +0 -72
- package/src/steps/detect-framework.ts +0 -94
- package/src/steps/display-final-message.ts +0 -31
- package/src/steps/index.ts +0 -10
- package/src/steps/install-lib.ts +0 -116
- package/src/steps/install-required-dependencies.ts +0 -106
- package/src/steps/loginOrBypass.ts +0 -25
- package/src/steps/sendStarterData.ts +0 -31
- package/src/steps/set-version.ts +0 -61
- package/src/steps/starters/custom-types.ts +0 -81
- package/src/steps/starters/documents.ts +0 -95
- package/src/steps/starters/prompts.ts +0 -29
- package/src/steps/starters/s3.ts +0 -70
- package/src/steps/starters/slices.ts +0 -75
- package/src/steps/validate-pkg.ts +0 -14
- package/src/utils/PackageManager.ts +0 -66
- package/src/utils/auth/helpers.ts +0 -168
- package/src/utils/auth/index.ts +0 -63
- package/src/utils/client.ts +0 -89
- package/src/utils/create-repo.ts +0 -37
- package/src/utils/fs.ts +0 -18
- package/src/utils/index.ts +0 -42
- package/src/utils/logs.ts +0 -28
- package/src/utils/noop.ts +0 -3
- package/src/utils/tracker.ts +0 -153
- package/src/utils/validateRepositoryName.ts +0 -44
- package/src/utils/versionCheck.ts +0 -10
- package/tsconfig.json +0 -26
- /package/dist/{__node_modules/meow/__node_modules → _node_modules/meow/_node_modules}/yargs-parser/build/lib/index.cjs +0 -0
- /package/dist/{__node_modules/meow/__node_modules → _node_modules/meow/_node_modules}/yargs-parser/build/lib/index.js +0 -0
- /package/dist/{__node_modules/meow/__node_modules → _node_modules/meow/_node_modules}/yargs-parser/build/lib/string-utils.cjs +0 -0
- /package/dist/{__node_modules/meow/__node_modules → _node_modules/meow/_node_modules}/yargs-parser/build/lib/string-utils.js +0 -0
- /package/dist/{__node_modules/meow/__node_modules → _node_modules/meow/_node_modules}/yargs-parser/build/lib/tokenize-arg-string.cjs +0 -0
- /package/dist/{__node_modules/meow/__node_modules → _node_modules/meow/_node_modules}/yargs-parser/build/lib/tokenize-arg-string.js +0 -0
- /package/dist/{__node_modules/meow/__node_modules → _node_modules/meow/_node_modules}/yargs-parser/build/lib/yargs-parser-types.cjs +0 -0
- /package/dist/{__node_modules/meow/__node_modules → _node_modules/meow/_node_modules}/yargs-parser/build/lib/yargs-parser-types.js +0 -0
- /package/dist/{__node_modules/meow/__node_modules → _node_modules/meow/_node_modules}/yargs-parser/build/lib/yargs-parser.cjs +0 -0
- /package/dist/{__node_modules/meow/__node_modules → _node_modules/meow/_node_modules}/yargs-parser/build/lib/yargs-parser.js +0 -0
|
@@ -0,0 +1,1114 @@
|
|
|
1
|
+
import * as fs from "node:fs/promises";
|
|
2
|
+
import * as path from "node:path";
|
|
3
|
+
|
|
4
|
+
import chalk from "chalk";
|
|
5
|
+
import type { ExecaChildProcess } from "execa";
|
|
6
|
+
import open from "open";
|
|
7
|
+
import logSymbols from "log-symbols";
|
|
8
|
+
import { globby } from "globby";
|
|
9
|
+
|
|
10
|
+
import {
|
|
11
|
+
createSliceMachineManager,
|
|
12
|
+
PrismicUserProfile,
|
|
13
|
+
PrismicRepository,
|
|
14
|
+
SliceMachineManager,
|
|
15
|
+
PackageManager,
|
|
16
|
+
} from "@slicemachine/manager";
|
|
17
|
+
|
|
18
|
+
import pkg from "../package.json";
|
|
19
|
+
import { detectFramework, Framework } from "./lib/framework";
|
|
20
|
+
import { getRunScriptCommand } from "./lib/getRunScriptCommand";
|
|
21
|
+
import { getExecuteCommand } from "./lib/getExecuteCommand";
|
|
22
|
+
import {
|
|
23
|
+
getRandomRepositoryDomain,
|
|
24
|
+
formatRepositoryDomain,
|
|
25
|
+
validateRepositoryDomain,
|
|
26
|
+
validateRepositoryDomainAndAvailability,
|
|
27
|
+
getErrorMessageForRepositoryDomainValidation,
|
|
28
|
+
} from "./lib/repositoryDomain";
|
|
29
|
+
import { listr, listrRun } from "./lib/listr";
|
|
30
|
+
import { prompt } from "./lib/prompt";
|
|
31
|
+
import { assertExists } from "./lib/assertExists";
|
|
32
|
+
import { START_SCRIPT_KEY, START_SCRIPT_VALUE } from "./constants";
|
|
33
|
+
|
|
34
|
+
export type SliceMachineInitProcessOptions = {
|
|
35
|
+
repository?: string;
|
|
36
|
+
push?: boolean;
|
|
37
|
+
pushSlices?: boolean;
|
|
38
|
+
pushCustomTypes?: boolean;
|
|
39
|
+
pushDocuments?: boolean;
|
|
40
|
+
cwd?: string;
|
|
41
|
+
} & Record<string, unknown>;
|
|
42
|
+
|
|
43
|
+
const DEFAULT_OPTIONS: SliceMachineInitProcessOptions = {
|
|
44
|
+
push: true,
|
|
45
|
+
pushSlices: true,
|
|
46
|
+
pushCustomTypes: true,
|
|
47
|
+
pushDocuments: true,
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const createSliceMachineInitProcess = (
|
|
51
|
+
options?: SliceMachineInitProcessOptions,
|
|
52
|
+
): SliceMachineInitProcess => {
|
|
53
|
+
return new SliceMachineInitProcess(options);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
type SliceMachineInitProcessContext = {
|
|
57
|
+
framework?: Framework;
|
|
58
|
+
packageManager?: PackageManager;
|
|
59
|
+
installProcess?: ExecaChildProcess;
|
|
60
|
+
userProfile?: PrismicUserProfile;
|
|
61
|
+
userRepositories?: PrismicRepository[];
|
|
62
|
+
repository?: {
|
|
63
|
+
domain: string;
|
|
64
|
+
exists: boolean;
|
|
65
|
+
};
|
|
66
|
+
projectInitialization?: {
|
|
67
|
+
patchedScript?: boolean;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export class SliceMachineInitProcess {
|
|
72
|
+
protected options: SliceMachineInitProcessOptions;
|
|
73
|
+
protected manager: SliceMachineManager;
|
|
74
|
+
|
|
75
|
+
protected context: SliceMachineInitProcessContext;
|
|
76
|
+
|
|
77
|
+
constructor(options?: SliceMachineInitProcessOptions) {
|
|
78
|
+
this.options = { ...DEFAULT_OPTIONS, ...options };
|
|
79
|
+
this.manager = createSliceMachineManager({ cwd: options?.cwd });
|
|
80
|
+
|
|
81
|
+
this.context = {};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
async run(): Promise<void> {
|
|
85
|
+
// We prefer to manually allow console logs despite the app being a CLI to catch wild/unwanted console logs better
|
|
86
|
+
// eslint-disable-next-line no-console
|
|
87
|
+
console.log(
|
|
88
|
+
`\n${chalk.bgGray(` ${chalk.bold.white("Slice Machine")} `)} ${chalk.dim(
|
|
89
|
+
"→",
|
|
90
|
+
)} Init command started\n`,
|
|
91
|
+
);
|
|
92
|
+
|
|
93
|
+
if (await this.manager.telemetry.checkIsTelemetryEnabled()) {
|
|
94
|
+
// We prefer to manually allow console logs despite the app being a CLI to catch wild/unwanted console logs better
|
|
95
|
+
// eslint-disable-next-line no-console
|
|
96
|
+
console.log(
|
|
97
|
+
`${
|
|
98
|
+
logSymbols.info
|
|
99
|
+
} We collect telemetry data to improve user experience.\n Learn more: ${chalk.cyan(
|
|
100
|
+
"https://prismic.dev/slice-machine/telemetry",
|
|
101
|
+
)}\n`,
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
await this.manager.telemetry.initTelemetry({
|
|
105
|
+
appName: pkg.name,
|
|
106
|
+
appVersion: pkg.version,
|
|
107
|
+
});
|
|
108
|
+
await this.manager.telemetry.track({
|
|
109
|
+
event: "command:init:start",
|
|
110
|
+
repository: this.options.repository,
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
try {
|
|
114
|
+
await this.detectEnvironment();
|
|
115
|
+
|
|
116
|
+
assertExists(
|
|
117
|
+
this.context.framework,
|
|
118
|
+
"Project framework must be available through context to proceed",
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
await this.beginCoreDependenciesInstallation();
|
|
122
|
+
await this.loginAndFetchUserData();
|
|
123
|
+
|
|
124
|
+
if (this.options.repository) {
|
|
125
|
+
await this.useRepositoryFlag();
|
|
126
|
+
} else {
|
|
127
|
+
await this.selectRepository();
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
assertExists(
|
|
131
|
+
this.context.repository,
|
|
132
|
+
"Repository selection must be available through context to proceed",
|
|
133
|
+
);
|
|
134
|
+
|
|
135
|
+
if (!this.context.repository.exists) {
|
|
136
|
+
await this.createNewRepository();
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
await this.finishCoreDependenciesInstallation();
|
|
140
|
+
await this.upsertSliceMachineConfigurationAndStartPluginRunner();
|
|
141
|
+
await this.pushDataToPrismic();
|
|
142
|
+
await this.initializeProject();
|
|
143
|
+
await this.initializePlugins();
|
|
144
|
+
} catch (error) {
|
|
145
|
+
await this.trackError(error);
|
|
146
|
+
|
|
147
|
+
throw error;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
await this.manager.telemetry.track({
|
|
151
|
+
event: "command:init:end",
|
|
152
|
+
framework: this.context.framework.prismicName,
|
|
153
|
+
repository: this.context.repository.domain,
|
|
154
|
+
success: true,
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
// We prefer to manually allow console logs despite the app being a CLI to catch wild/unwanted console logs better
|
|
158
|
+
// eslint-disable-next-line no-console
|
|
159
|
+
console.log(
|
|
160
|
+
`\n${chalk.bgGreen(` ${chalk.bold.white("Slice Machine")} `)} ${chalk.dim(
|
|
161
|
+
"→",
|
|
162
|
+
)} Init command successful!`,
|
|
163
|
+
);
|
|
164
|
+
|
|
165
|
+
try {
|
|
166
|
+
const apiEndpoints = this.manager.getAPIEndpoints();
|
|
167
|
+
const wroomHost = new URL(apiEndpoints.PrismicWroom).host;
|
|
168
|
+
|
|
169
|
+
const dashboardURL = new URL(
|
|
170
|
+
`https://${this.context.repository.domain}.${wroomHost}`,
|
|
171
|
+
)
|
|
172
|
+
.toString()
|
|
173
|
+
.replace(/\/$/, "");
|
|
174
|
+
const apiURL = new URL(
|
|
175
|
+
"./api/v2",
|
|
176
|
+
`https://${this.context.repository.domain}.cdn.${wroomHost}`,
|
|
177
|
+
).toString();
|
|
178
|
+
|
|
179
|
+
// We prefer to manually allow console logs despite the app being a CLI to catch wild/unwanted console logs better
|
|
180
|
+
// eslint-disable-next-line no-console
|
|
181
|
+
console.log(`
|
|
182
|
+
YOUR REPOSITORY
|
|
183
|
+
Dashboard ${chalk.cyan(dashboardURL)}
|
|
184
|
+
API ${chalk.cyan(apiURL)}
|
|
185
|
+
|
|
186
|
+
RESOURCES
|
|
187
|
+
Documentation ${chalk.cyan(
|
|
188
|
+
this.context.framework.prismicDocumentation,
|
|
189
|
+
)}
|
|
190
|
+
Getting help ${chalk.cyan("https://community.prismic.io")}
|
|
191
|
+
|
|
192
|
+
GETTING STARTED
|
|
193
|
+
Run Slice Machine ${chalk.cyan(
|
|
194
|
+
this.context.projectInitialization?.patchedScript
|
|
195
|
+
? await getRunScriptCommand({
|
|
196
|
+
agent: this.context.packageManager || "npm",
|
|
197
|
+
script: "slicemachine",
|
|
198
|
+
})
|
|
199
|
+
: await getExecuteCommand({
|
|
200
|
+
agent: this.context.packageManager || "npm",
|
|
201
|
+
script: "start-slicemachine",
|
|
202
|
+
}),
|
|
203
|
+
)}
|
|
204
|
+
Run your project ${chalk.cyan(
|
|
205
|
+
await getRunScriptCommand({
|
|
206
|
+
agent: this.context.packageManager || "npm",
|
|
207
|
+
script: "dev",
|
|
208
|
+
}),
|
|
209
|
+
)}`);
|
|
210
|
+
} catch {
|
|
211
|
+
// Noop, it's only the final convenience messsage
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
protected trackError = (error: unknown): Promise<void> => {
|
|
216
|
+
// Transform error to string and prevent hitting Segment 500kb API limit or sending ridiculously long trace
|
|
217
|
+
const safeError = (
|
|
218
|
+
error instanceof Error ? error.message : `${error}`
|
|
219
|
+
).slice(0, 512);
|
|
220
|
+
|
|
221
|
+
return this.manager.telemetry.track({
|
|
222
|
+
event: "command:init:end",
|
|
223
|
+
framework: this.context.framework?.prismicName ?? "unknown",
|
|
224
|
+
repository: this.context.repository?.domain,
|
|
225
|
+
success: false,
|
|
226
|
+
error: safeError,
|
|
227
|
+
});
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
protected detectEnvironment(): Promise<void> {
|
|
231
|
+
return listrRun([
|
|
232
|
+
{
|
|
233
|
+
title: "Detecting environment...",
|
|
234
|
+
task: (_, parentTask) =>
|
|
235
|
+
listr([
|
|
236
|
+
{
|
|
237
|
+
title: "Detecting framework...",
|
|
238
|
+
task: async (_, task) => {
|
|
239
|
+
this.context.framework = await detectFramework(
|
|
240
|
+
this.manager.cwd,
|
|
241
|
+
);
|
|
242
|
+
|
|
243
|
+
task.title = `Detected framework ${chalk.cyan(
|
|
244
|
+
this.context.framework.name,
|
|
245
|
+
)}`;
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
title: "Detecting package manager...",
|
|
250
|
+
task: async (_, task) => {
|
|
251
|
+
this.context.packageManager =
|
|
252
|
+
await this.manager.project.detectPackageManager({
|
|
253
|
+
root: this.manager.cwd,
|
|
254
|
+
});
|
|
255
|
+
|
|
256
|
+
task.title = `Detected package manager ${chalk.cyan(
|
|
257
|
+
this.context.packageManager,
|
|
258
|
+
)}`;
|
|
259
|
+
|
|
260
|
+
assertExists(
|
|
261
|
+
this.context.framework,
|
|
262
|
+
"Project framework must be available through context to proceed",
|
|
263
|
+
);
|
|
264
|
+
parentTask.title = `Detected framework ${chalk.cyan(
|
|
265
|
+
this.context.framework.name,
|
|
266
|
+
)} and package manager ${chalk.cyan(
|
|
267
|
+
this.context.packageManager,
|
|
268
|
+
)}`;
|
|
269
|
+
},
|
|
270
|
+
},
|
|
271
|
+
]),
|
|
272
|
+
},
|
|
273
|
+
]);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
protected beginCoreDependenciesInstallation(): Promise<void> {
|
|
277
|
+
return listrRun([
|
|
278
|
+
{
|
|
279
|
+
title: "Beginning core dependencies installation...",
|
|
280
|
+
task: async (_, task) => {
|
|
281
|
+
assertExists(
|
|
282
|
+
this.context.packageManager,
|
|
283
|
+
"Project package manager must be available through context to run `beginCoreDependenciesInstallation`",
|
|
284
|
+
);
|
|
285
|
+
assertExists(
|
|
286
|
+
this.context.framework,
|
|
287
|
+
"Project framework must be available through context to run `beginCoreDependenciesInstallation`",
|
|
288
|
+
);
|
|
289
|
+
|
|
290
|
+
const { execaProcess } =
|
|
291
|
+
await this.manager.project.installDependencies({
|
|
292
|
+
packageManager: this.context.packageManager,
|
|
293
|
+
dependencies: this.context.framework.devDependencies,
|
|
294
|
+
dev: true,
|
|
295
|
+
// Picked up later
|
|
296
|
+
log: () => {
|
|
297
|
+
/* ... */
|
|
298
|
+
},
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
// Fail hard if process fails
|
|
302
|
+
execaProcess.catch(async (error) => {
|
|
303
|
+
const [_, ...argv1n] = process.argv;
|
|
304
|
+
// Command the user used
|
|
305
|
+
let tryAgainCommand = [process.argv0, ...argv1n].join(" ");
|
|
306
|
+
|
|
307
|
+
// If the `repository` option wasn't used AND the repository was selected/created
|
|
308
|
+
if (!this.options.repository && this.context.repository) {
|
|
309
|
+
tryAgainCommand = `${tryAgainCommand} --repository=${this.context.repository.domain}`;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
await this.trackError(error.shortMessage);
|
|
313
|
+
console.error(
|
|
314
|
+
`\n\n${error.shortMessage}\n${error.stderr}\n\n${
|
|
315
|
+
logSymbols.error
|
|
316
|
+
} Dependency installation failed, try again with:\n\n ${chalk.gray(
|
|
317
|
+
"$",
|
|
318
|
+
)} ${chalk.cyan(tryAgainCommand)}`,
|
|
319
|
+
);
|
|
320
|
+
|
|
321
|
+
process.exit(1);
|
|
322
|
+
});
|
|
323
|
+
|
|
324
|
+
this.context.installProcess = execaProcess;
|
|
325
|
+
|
|
326
|
+
task.title = `Began core dependencies installation with ${chalk.cyan(
|
|
327
|
+
this.context.packageManager,
|
|
328
|
+
)} ... (running in background)`;
|
|
329
|
+
},
|
|
330
|
+
},
|
|
331
|
+
]);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
protected loginAndFetchUserData(): Promise<void> {
|
|
335
|
+
return listrRun([
|
|
336
|
+
{
|
|
337
|
+
title: "Logging in to Prismic...",
|
|
338
|
+
task: async (_, parentTask) => {
|
|
339
|
+
parentTask.output = "Validating session...";
|
|
340
|
+
const isLoggedIn = await this.manager.user.checkIsLoggedIn();
|
|
341
|
+
|
|
342
|
+
if (!isLoggedIn) {
|
|
343
|
+
parentTask.output = "Press any key to open the browser to login...";
|
|
344
|
+
await new Promise((resolve) => {
|
|
345
|
+
const initialRawMode = !!process.stdin.isRaw;
|
|
346
|
+
process.stdin.setRawMode?.(true);
|
|
347
|
+
process.stdin.once("data", (data: Buffer) => {
|
|
348
|
+
process.stdin.setRawMode?.(initialRawMode);
|
|
349
|
+
process.stdin.pause();
|
|
350
|
+
resolve(data.toString("utf-8"));
|
|
351
|
+
});
|
|
352
|
+
});
|
|
353
|
+
|
|
354
|
+
parentTask.output = "Browser opened, waiting for you to login...";
|
|
355
|
+
const { port, url } = await this.manager.user.getLoginSessionInfo();
|
|
356
|
+
await this.manager.user.nodeLoginSession({
|
|
357
|
+
port,
|
|
358
|
+
onListenCallback() {
|
|
359
|
+
open(url);
|
|
360
|
+
},
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
parentTask.output = "";
|
|
365
|
+
parentTask.title = `Logged in`;
|
|
366
|
+
|
|
367
|
+
return listr(
|
|
368
|
+
[
|
|
369
|
+
{
|
|
370
|
+
title: "Fetching user profile...",
|
|
371
|
+
task: async (_, task) => {
|
|
372
|
+
this.context.userProfile =
|
|
373
|
+
await this.manager.user.getProfile();
|
|
374
|
+
|
|
375
|
+
await this.manager.telemetry.identify({
|
|
376
|
+
userID: this.context.userProfile.shortId,
|
|
377
|
+
intercomHash: this.context.userProfile.intercomHash,
|
|
378
|
+
});
|
|
379
|
+
await this.manager.telemetry.track({
|
|
380
|
+
event: "command:init:identify",
|
|
381
|
+
repository: this.options.repository,
|
|
382
|
+
});
|
|
383
|
+
|
|
384
|
+
parentTask.title = `Logged in as ${chalk.cyan(
|
|
385
|
+
this.context.userProfile?.email,
|
|
386
|
+
)}`;
|
|
387
|
+
task.title = "Fetched user profile";
|
|
388
|
+
},
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
title: "Fetching user repositories...",
|
|
392
|
+
task: async (_, task) => {
|
|
393
|
+
this.context.userRepositories =
|
|
394
|
+
await this.manager.prismicRepository.readAll();
|
|
395
|
+
|
|
396
|
+
task.title = "Fetched user repositories";
|
|
397
|
+
},
|
|
398
|
+
},
|
|
399
|
+
],
|
|
400
|
+
{ concurrent: true },
|
|
401
|
+
);
|
|
402
|
+
},
|
|
403
|
+
},
|
|
404
|
+
]);
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
protected useRepositoryFlag(): Promise<void> {
|
|
408
|
+
return listrRun([
|
|
409
|
+
{
|
|
410
|
+
title: `Flag ${chalk.cyan("repository")} used, validating input...`,
|
|
411
|
+
task: async (_, task) => {
|
|
412
|
+
assertExists(
|
|
413
|
+
this.context.userRepositories,
|
|
414
|
+
"User repositories must be available through context to run `useRepositoryFlag`",
|
|
415
|
+
);
|
|
416
|
+
assertExists(
|
|
417
|
+
this.options.repository,
|
|
418
|
+
"Flag `repository` must be set to run `useRepositoryFlag`",
|
|
419
|
+
);
|
|
420
|
+
|
|
421
|
+
const domain = formatRepositoryDomain(this.options.repository);
|
|
422
|
+
|
|
423
|
+
const maybeRepository = this.context.userRepositories.find(
|
|
424
|
+
(repository) => repository.domain === domain,
|
|
425
|
+
);
|
|
426
|
+
|
|
427
|
+
if (maybeRepository) {
|
|
428
|
+
if (
|
|
429
|
+
!this.manager.prismicRepository.hasWriteAccess(maybeRepository)
|
|
430
|
+
) {
|
|
431
|
+
throw new Error(
|
|
432
|
+
`Cannot run init command with repository ${chalk.cyan(
|
|
433
|
+
maybeRepository.domain,
|
|
434
|
+
)}: you are not a developer or admin of this repository`,
|
|
435
|
+
);
|
|
436
|
+
}
|
|
437
|
+
} else {
|
|
438
|
+
const validation = await validateRepositoryDomainAndAvailability({
|
|
439
|
+
domain,
|
|
440
|
+
existsFn: (domain) =>
|
|
441
|
+
this.manager.prismicRepository.checkExists({ domain }),
|
|
442
|
+
});
|
|
443
|
+
const errorMessage = getErrorMessageForRepositoryDomainValidation({
|
|
444
|
+
validation,
|
|
445
|
+
displayDomain: chalk.cyan(domain),
|
|
446
|
+
});
|
|
447
|
+
|
|
448
|
+
if (errorMessage) {
|
|
449
|
+
throw new Error(errorMessage);
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
task.title = `Selected repository ${chalk.cyan(
|
|
454
|
+
domain,
|
|
455
|
+
)} (flag ${chalk.cyan("repository")} used)`;
|
|
456
|
+
|
|
457
|
+
this.context.repository = {
|
|
458
|
+
domain,
|
|
459
|
+
exists: !!maybeRepository,
|
|
460
|
+
};
|
|
461
|
+
},
|
|
462
|
+
},
|
|
463
|
+
]);
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
protected async selectRepository(): Promise<void> {
|
|
467
|
+
assertExists(
|
|
468
|
+
this.context.userRepositories,
|
|
469
|
+
"User repositories must be available through context to run `selectRepository`",
|
|
470
|
+
);
|
|
471
|
+
|
|
472
|
+
if (this.context.userRepositories.length) {
|
|
473
|
+
await this.trySelectExistingRepository();
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
if (!this.context.repository) {
|
|
477
|
+
await this.selectNewRepository();
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
assertExists(
|
|
481
|
+
this.context.repository,
|
|
482
|
+
"Repository selection must be available through context to proceed",
|
|
483
|
+
);
|
|
484
|
+
// We prefer to manually allow console logs despite the app being a CLI to catch wild/unwanted console logs better
|
|
485
|
+
// eslint-disable-next-line no-console
|
|
486
|
+
console.log(
|
|
487
|
+
`${logSymbols.success} Selected repository ${chalk.cyan(
|
|
488
|
+
this.context.repository.domain,
|
|
489
|
+
)}`,
|
|
490
|
+
);
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
protected async trySelectExistingRepository(): Promise<void> {
|
|
494
|
+
assertExists(
|
|
495
|
+
this.context.userRepositories,
|
|
496
|
+
"User repositories must be available through context to run `trySelectExistingRepository`",
|
|
497
|
+
);
|
|
498
|
+
|
|
499
|
+
const { maybeDomain } = await prompt<string, "maybeDomain">({
|
|
500
|
+
type: "select",
|
|
501
|
+
name: "maybeDomain",
|
|
502
|
+
message: "Pick a repository to connect to or choose to create a new one",
|
|
503
|
+
warn: "You are not a developer or admin of this repository",
|
|
504
|
+
choices: [
|
|
505
|
+
{
|
|
506
|
+
title: "CREATE NEW",
|
|
507
|
+
description: "Create a new Prismic repository\n",
|
|
508
|
+
value: "",
|
|
509
|
+
},
|
|
510
|
+
...this.context.userRepositories
|
|
511
|
+
.map((repository) => {
|
|
512
|
+
const hasWriteAccess =
|
|
513
|
+
this.manager.prismicRepository.hasWriteAccess(repository);
|
|
514
|
+
|
|
515
|
+
return {
|
|
516
|
+
title: `${repository.domain}${
|
|
517
|
+
hasWriteAccess ? "" : " (Unauthorized)"
|
|
518
|
+
}`,
|
|
519
|
+
description: `Connect to ${chalk.cyan(repository.domain)}`,
|
|
520
|
+
value: repository.domain,
|
|
521
|
+
disabled: !hasWriteAccess,
|
|
522
|
+
};
|
|
523
|
+
})
|
|
524
|
+
.sort((a, b) => (a.value > b.value ? 1 : -1)),
|
|
525
|
+
],
|
|
526
|
+
});
|
|
527
|
+
|
|
528
|
+
if (maybeDomain) {
|
|
529
|
+
this.context.repository = {
|
|
530
|
+
domain: maybeDomain,
|
|
531
|
+
exists: true,
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
protected async selectNewRepository(): Promise<void> {
|
|
537
|
+
let suggestedName = "";
|
|
538
|
+
|
|
539
|
+
// TODO: Improve concurrency
|
|
540
|
+
const trySuggestName = async (name: string): Promise<string | void> => {
|
|
541
|
+
if (name) {
|
|
542
|
+
const formattedName = formatRepositoryDomain(name);
|
|
543
|
+
|
|
544
|
+
if (
|
|
545
|
+
!validateRepositoryDomain({ domain: formattedName }).hasErrors &&
|
|
546
|
+
!(await this.manager.prismicRepository.checkExists({
|
|
547
|
+
domain: formattedName,
|
|
548
|
+
}))
|
|
549
|
+
) {
|
|
550
|
+
return formattedName;
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
};
|
|
554
|
+
|
|
555
|
+
// 1. Try to suggest name after package name
|
|
556
|
+
try {
|
|
557
|
+
const pkgJSONPath = path.join(this.manager.cwd, "package.json");
|
|
558
|
+
const pkg = JSON.parse(await fs.readFile(pkgJSONPath, "utf-8"));
|
|
559
|
+
|
|
560
|
+
const maybeSuggestion = await trySuggestName(pkg.name);
|
|
561
|
+
if (maybeSuggestion) {
|
|
562
|
+
suggestedName = maybeSuggestion;
|
|
563
|
+
}
|
|
564
|
+
} catch {
|
|
565
|
+
// Noop
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
// 2. Try to suggest name after directory name
|
|
569
|
+
if (!suggestedName) {
|
|
570
|
+
const maybeSuggestion = await trySuggestName(
|
|
571
|
+
path.basename(this.manager.cwd),
|
|
572
|
+
);
|
|
573
|
+
if (maybeSuggestion) {
|
|
574
|
+
suggestedName = maybeSuggestion;
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
// 3. Use random name
|
|
579
|
+
if (!suggestedName) {
|
|
580
|
+
do {
|
|
581
|
+
suggestedName = getRandomRepositoryDomain();
|
|
582
|
+
} while (
|
|
583
|
+
await this.manager.prismicRepository.checkExists({
|
|
584
|
+
domain: suggestedName,
|
|
585
|
+
})
|
|
586
|
+
);
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
const { domain } = await prompt<string, "domain">({
|
|
590
|
+
type: "text",
|
|
591
|
+
name: "domain",
|
|
592
|
+
// Overriden by the `onRender` function, just used as a fallback
|
|
593
|
+
message: "Choose a name for your Prismic repository",
|
|
594
|
+
initial: suggestedName,
|
|
595
|
+
onRender() {
|
|
596
|
+
const rawDomain = this.value || this.initial || "";
|
|
597
|
+
const domain = formatRepositoryDomain(rawDomain);
|
|
598
|
+
const validation = validateRepositoryDomain({ domain });
|
|
599
|
+
|
|
600
|
+
const minRule = validation.LessThan4
|
|
601
|
+
? chalk.red(
|
|
602
|
+
`1. Name must be ${chalk.bold("4 characters long or more")}`,
|
|
603
|
+
)
|
|
604
|
+
: `1. Name must be ${chalk.cyan("4 characters long or more")}`;
|
|
605
|
+
|
|
606
|
+
const maxRule = validation.MoreThan30
|
|
607
|
+
? chalk.red(
|
|
608
|
+
`1. Name must be ${chalk.bold("30 characters long or less")}`,
|
|
609
|
+
)
|
|
610
|
+
: `1. Name must be ${chalk.cyan("30 characters long or less")}`;
|
|
611
|
+
|
|
612
|
+
this.msg = chalk.reset(
|
|
613
|
+
`
|
|
614
|
+
Choose a name for your Prismic repository
|
|
615
|
+
|
|
616
|
+
NAMING RULES
|
|
617
|
+
${minRule}
|
|
618
|
+
${maxRule}
|
|
619
|
+
3. Name will be ${chalk.cyan("kebab-cased")} automatically
|
|
620
|
+
|
|
621
|
+
CONSIDERATIONS
|
|
622
|
+
1. Once picked, your repository name ${chalk.cyan("cannot be changed")}
|
|
623
|
+
2. A ${chalk.cyan(
|
|
624
|
+
"display name",
|
|
625
|
+
)} for the repository can be configured later on
|
|
626
|
+
|
|
627
|
+
PREVIEW
|
|
628
|
+
Dashboard ${chalk.cyan(`https://${domain}.prismic.io`)}
|
|
629
|
+
API ${chalk.cyan(`https://${domain}.cdn.prismic.io/api/v2`)}
|
|
630
|
+
|
|
631
|
+
${chalk.cyan("?")} Your Prismic repository name`.replace("\n", ""),
|
|
632
|
+
);
|
|
633
|
+
},
|
|
634
|
+
validate: async (rawDomain: string) => {
|
|
635
|
+
const domain = formatRepositoryDomain(rawDomain);
|
|
636
|
+
const validation = await validateRepositoryDomainAndAvailability({
|
|
637
|
+
domain,
|
|
638
|
+
existsFn: (domain) =>
|
|
639
|
+
this.manager.prismicRepository.checkExists({ domain }),
|
|
640
|
+
});
|
|
641
|
+
const errorMessage = getErrorMessageForRepositoryDomainValidation({
|
|
642
|
+
validation,
|
|
643
|
+
displayDomain: chalk.cyan(domain),
|
|
644
|
+
});
|
|
645
|
+
|
|
646
|
+
return errorMessage || true;
|
|
647
|
+
},
|
|
648
|
+
format: (value) => {
|
|
649
|
+
return formatRepositoryDomain(value);
|
|
650
|
+
},
|
|
651
|
+
});
|
|
652
|
+
|
|
653
|
+
// Clear extra lines
|
|
654
|
+
process.stdout.moveCursor?.(0, -16);
|
|
655
|
+
process.stdout.clearScreenDown?.();
|
|
656
|
+
|
|
657
|
+
this.context.repository = {
|
|
658
|
+
domain,
|
|
659
|
+
exists: false,
|
|
660
|
+
};
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
protected createNewRepository(): Promise<void> {
|
|
664
|
+
assertExists(
|
|
665
|
+
this.context.repository,
|
|
666
|
+
"Repository selection must be available through context to run `createNewRepository`",
|
|
667
|
+
);
|
|
668
|
+
|
|
669
|
+
return listrRun([
|
|
670
|
+
{
|
|
671
|
+
title: `Creating new repository ${chalk.cyan(
|
|
672
|
+
this.context.repository.domain,
|
|
673
|
+
)} ...`,
|
|
674
|
+
task: async (_, task) => {
|
|
675
|
+
assertExists(
|
|
676
|
+
this.context.repository,
|
|
677
|
+
"Repository selection must be available through context to run `createNewRepository`",
|
|
678
|
+
);
|
|
679
|
+
assertExists(
|
|
680
|
+
this.context.framework,
|
|
681
|
+
"Project framework must be available through context to run `createNewRepository`",
|
|
682
|
+
);
|
|
683
|
+
|
|
684
|
+
await this.manager.prismicRepository.create({
|
|
685
|
+
domain: this.context.repository.domain,
|
|
686
|
+
framework: this.context.framework.prismicName,
|
|
687
|
+
});
|
|
688
|
+
|
|
689
|
+
this.context.repository.exists = true;
|
|
690
|
+
task.title = `Created new repository ${chalk.cyan(
|
|
691
|
+
this.context.repository.domain,
|
|
692
|
+
)}`;
|
|
693
|
+
},
|
|
694
|
+
},
|
|
695
|
+
]);
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
protected finishCoreDependenciesInstallation(): Promise<void> {
|
|
699
|
+
return listrRun([
|
|
700
|
+
{
|
|
701
|
+
title: `Finishing core dependencies installation with ${chalk.cyan(
|
|
702
|
+
this.context.packageManager,
|
|
703
|
+
)} ...`,
|
|
704
|
+
task: async (_, task) => {
|
|
705
|
+
assertExists(
|
|
706
|
+
this.context.installProcess,
|
|
707
|
+
"Initial dependencies installation process must be available through context to run `finishCoreDependenciesInstallation`",
|
|
708
|
+
);
|
|
709
|
+
|
|
710
|
+
const updateOutput = (data: Buffer | null) => {
|
|
711
|
+
if (data instanceof Buffer) {
|
|
712
|
+
task.output = data.toString();
|
|
713
|
+
}
|
|
714
|
+
};
|
|
715
|
+
|
|
716
|
+
// Don't clutter console with logs when process is non TTY (CI, etc.)
|
|
717
|
+
if (process.stdout.isTTY || process.env.NODE_ENV === "test") {
|
|
718
|
+
this.context.installProcess.stdout?.on("data", updateOutput);
|
|
719
|
+
}
|
|
720
|
+
this.context.installProcess.stderr?.on("data", updateOutput);
|
|
721
|
+
|
|
722
|
+
try {
|
|
723
|
+
await this.context.installProcess;
|
|
724
|
+
} catch (error) {
|
|
725
|
+
/**
|
|
726
|
+
* Error catching happens when then process is started ealier so
|
|
727
|
+
* that all install errors, earlier and presents, can be catched.
|
|
728
|
+
*
|
|
729
|
+
* Here, we force the task to wait so that it is neither marked as
|
|
730
|
+
* done or has the opportunity to handle the error itself.
|
|
731
|
+
*/
|
|
732
|
+
// If for whatever reason the process is not exited by now, we still throw the error
|
|
733
|
+
await new Promise((resolve) => setTimeout(resolve, 5000));
|
|
734
|
+
throw error;
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
task.title = `Installed core dependencies with ${chalk.cyan(
|
|
738
|
+
this.context.packageManager,
|
|
739
|
+
)}`;
|
|
740
|
+
},
|
|
741
|
+
},
|
|
742
|
+
]);
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
protected upsertSliceMachineConfigurationAndStartPluginRunner(): Promise<void> {
|
|
746
|
+
return listrRun([
|
|
747
|
+
{
|
|
748
|
+
title: "Resolving Slice Machine configuration...",
|
|
749
|
+
task: async (_, parentTask) => {
|
|
750
|
+
assertExists(
|
|
751
|
+
this.context.framework,
|
|
752
|
+
"Project framework must be available through context to run `upsertSliceMachineConfiguration`",
|
|
753
|
+
);
|
|
754
|
+
assertExists(
|
|
755
|
+
this.context.repository,
|
|
756
|
+
"Repository selection must be available through context to run `upsertSliceMachineConfiguration`",
|
|
757
|
+
);
|
|
758
|
+
|
|
759
|
+
let sliceMachineConfigExists = false;
|
|
760
|
+
try {
|
|
761
|
+
await this.manager.project.getSliceMachineConfigPath();
|
|
762
|
+
sliceMachineConfigExists = true;
|
|
763
|
+
} catch {
|
|
764
|
+
// noop, config does not exists, we'll create it
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
if (sliceMachineConfigExists) {
|
|
768
|
+
parentTask.title = "Updating Slice Machine configuration...";
|
|
769
|
+
|
|
770
|
+
const config = await this.manager.project.getSliceMachineConfig();
|
|
771
|
+
await this.manager.project.writeSliceMachineConfig({
|
|
772
|
+
config: {
|
|
773
|
+
...config,
|
|
774
|
+
repositoryName: this.context.repository.domain,
|
|
775
|
+
adapter: this.context.framework.adapterName,
|
|
776
|
+
},
|
|
777
|
+
});
|
|
778
|
+
parentTask.title = "Updated Slice Machine configuration";
|
|
779
|
+
} else {
|
|
780
|
+
parentTask.title = "Creating Slice Machine configuration...";
|
|
781
|
+
|
|
782
|
+
const sliceMachineConfigPath =
|
|
783
|
+
await this.manager.project.suggestSliceMachineConfigPath();
|
|
784
|
+
|
|
785
|
+
await this.manager.project.writeSliceMachineConfig({
|
|
786
|
+
config: {
|
|
787
|
+
repositoryName: this.context.repository.domain,
|
|
788
|
+
adapter: this.context.framework.adapterName,
|
|
789
|
+
libraries: ["./slices"],
|
|
790
|
+
},
|
|
791
|
+
path: sliceMachineConfigPath,
|
|
792
|
+
});
|
|
793
|
+
|
|
794
|
+
parentTask.title = "Created Slice Machine configuration";
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
return listr([
|
|
798
|
+
{
|
|
799
|
+
// TODO: Revert when plugin are introduced to users
|
|
800
|
+
// title: "Starting plugin runner...",
|
|
801
|
+
title: "Loading adapter...",
|
|
802
|
+
task: async (_, task) => {
|
|
803
|
+
await this.manager.plugins.initPlugins();
|
|
804
|
+
// TODO: Revert when plugin are introduced to users
|
|
805
|
+
// task.title = "Started plugin runner";
|
|
806
|
+
task.title = "Loaded adapter";
|
|
807
|
+
// TODO: Revert when plugin are introduced to users
|
|
808
|
+
// parentTask.title = `${parentTask.title} and started plugin runner`;
|
|
809
|
+
parentTask.title = `${parentTask.title} and loaded adapter`;
|
|
810
|
+
},
|
|
811
|
+
},
|
|
812
|
+
]);
|
|
813
|
+
},
|
|
814
|
+
},
|
|
815
|
+
]);
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
protected pushDataToPrismic(): Promise<void> {
|
|
819
|
+
return listrRun([
|
|
820
|
+
{
|
|
821
|
+
title: "Pushing data to Prismic...",
|
|
822
|
+
task: (_, parentTask) =>
|
|
823
|
+
listr([
|
|
824
|
+
{
|
|
825
|
+
title: "Pushing slices...",
|
|
826
|
+
skip: () => {
|
|
827
|
+
if (!this.options.push) {
|
|
828
|
+
return `--no-push used`;
|
|
829
|
+
} else if (!this.options.pushSlices) {
|
|
830
|
+
return `--no-push-slices used`;
|
|
831
|
+
}
|
|
832
|
+
},
|
|
833
|
+
task: async (_, task) => {
|
|
834
|
+
const { libraries, errors } =
|
|
835
|
+
await this.manager.slices.readAllSliceLibraries();
|
|
836
|
+
|
|
837
|
+
if (errors.length > 0) {
|
|
838
|
+
// TODO: Provide better error message.
|
|
839
|
+
throw new Error(
|
|
840
|
+
`Failed to read slice libraries: ${errors.join(", ")}`,
|
|
841
|
+
);
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
const slices: { libraryID: string; sliceID: string }[] = [];
|
|
845
|
+
for (const library of libraries) {
|
|
846
|
+
if (library.sliceIDs) {
|
|
847
|
+
for (const sliceID of library.sliceIDs) {
|
|
848
|
+
slices.push({
|
|
849
|
+
libraryID: library.libraryID,
|
|
850
|
+
sliceID,
|
|
851
|
+
});
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
if (slices.length === 0) {
|
|
857
|
+
task.skip("No slice to push");
|
|
858
|
+
|
|
859
|
+
return;
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
task.title = "Pushing slices... (initializing ACL)";
|
|
863
|
+
await this.manager.screenshots.initS3ACL();
|
|
864
|
+
|
|
865
|
+
let pushed = 0;
|
|
866
|
+
task.title = `Pushing slices... (0/${slices.length})`;
|
|
867
|
+
await Promise.all(
|
|
868
|
+
slices.map(async (slice) => {
|
|
869
|
+
await this.manager.slices.pushSlice(slice);
|
|
870
|
+
pushed++;
|
|
871
|
+
task.title = `Pushing slices... (${pushed}/${slices.length})`;
|
|
872
|
+
}),
|
|
873
|
+
);
|
|
874
|
+
|
|
875
|
+
task.title = "Pushed all slices";
|
|
876
|
+
},
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
title: "Pushing custom types...",
|
|
880
|
+
skip: () => {
|
|
881
|
+
if (!this.options.push) {
|
|
882
|
+
return `--no-push used`;
|
|
883
|
+
} else if (!this.options.pushCustomTypes) {
|
|
884
|
+
return `--no-push-custom-types used`;
|
|
885
|
+
}
|
|
886
|
+
},
|
|
887
|
+
task: async (_, task) => {
|
|
888
|
+
const { ids, errors } =
|
|
889
|
+
await this.manager.customTypes.readCustomTypeLibrary();
|
|
890
|
+
|
|
891
|
+
if (errors.length > 0) {
|
|
892
|
+
// TODO: Provide better error message.
|
|
893
|
+
throw new Error(
|
|
894
|
+
`Failed to read custom type libraries: ${errors.join(
|
|
895
|
+
", ",
|
|
896
|
+
)}`,
|
|
897
|
+
);
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
if (!ids || ids.length === 0) {
|
|
901
|
+
task.skip("No custom type to push");
|
|
902
|
+
|
|
903
|
+
return;
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
let pushed = 0;
|
|
907
|
+
task.title = `Pushing custom types... (0/${ids.length})`;
|
|
908
|
+
await Promise.all(
|
|
909
|
+
ids.map(async (id) => {
|
|
910
|
+
await this.manager.customTypes.pushCustomType({ id });
|
|
911
|
+
pushed++;
|
|
912
|
+
task.title = `Pushing custom types... (${pushed}/${ids.length})`;
|
|
913
|
+
}),
|
|
914
|
+
);
|
|
915
|
+
|
|
916
|
+
task.title = "Pushed all custom types";
|
|
917
|
+
},
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
title: "Pushing documents...",
|
|
921
|
+
skip: () => {
|
|
922
|
+
if (!this.options.push) {
|
|
923
|
+
return `--no-push used`;
|
|
924
|
+
} else if (!this.options.pushDocuments) {
|
|
925
|
+
return `--no-push-documents used`;
|
|
926
|
+
}
|
|
927
|
+
},
|
|
928
|
+
task: async (_, task) => {
|
|
929
|
+
assertExists(
|
|
930
|
+
this.context.repository,
|
|
931
|
+
"Repository selection must be available through context to run `pushDataToPrismic`",
|
|
932
|
+
);
|
|
933
|
+
|
|
934
|
+
const root = await this.manager.project.getRoot();
|
|
935
|
+
const documentsDirectoryPath = path.resolve(root, "documents");
|
|
936
|
+
|
|
937
|
+
try {
|
|
938
|
+
await fs.access(documentsDirectoryPath);
|
|
939
|
+
} catch {
|
|
940
|
+
parentTask.title = "Pushed data to Prismic";
|
|
941
|
+
task.skip("No document to push");
|
|
942
|
+
|
|
943
|
+
return;
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
const signaturePath = path.resolve(
|
|
947
|
+
documentsDirectoryPath,
|
|
948
|
+
"index.json",
|
|
949
|
+
);
|
|
950
|
+
const rawSignature = await fs.readFile(signaturePath, "utf-8");
|
|
951
|
+
const signature: string = JSON.parse(rawSignature).signature;
|
|
952
|
+
|
|
953
|
+
const documentsGlob = await globby("*/*.json", {
|
|
954
|
+
cwd: documentsDirectoryPath,
|
|
955
|
+
});
|
|
956
|
+
if (documentsGlob.length === 0) {
|
|
957
|
+
parentTask.title = "Pushed data to Prismic";
|
|
958
|
+
task.skip("No document to push");
|
|
959
|
+
|
|
960
|
+
return;
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
// TODO: Replace `unknown` with a Prismic document type.
|
|
964
|
+
// The exact format is not know at this time, hence the `unknown`.
|
|
965
|
+
const documents: Record<string, unknown> = {};
|
|
966
|
+
|
|
967
|
+
await Promise.all(
|
|
968
|
+
documentsGlob.map(async (documentPath) => {
|
|
969
|
+
const filename = path.basename(documentPath, ".json");
|
|
970
|
+
const fileContent = await fs.readFile(
|
|
971
|
+
path.resolve(documentsDirectoryPath, documentPath),
|
|
972
|
+
"utf-8",
|
|
973
|
+
);
|
|
974
|
+
|
|
975
|
+
try {
|
|
976
|
+
// TOOD: Validate the contents of the JSON file and skip on invalid documents.
|
|
977
|
+
const parsedContents = JSON.parse(fileContent);
|
|
978
|
+
|
|
979
|
+
documents[filename] = parsedContents;
|
|
980
|
+
} catch {
|
|
981
|
+
// We prefer to manually allow console logs despite the app being a CLI to catch wild/unwanted console logs better
|
|
982
|
+
// eslint-disable-next-line no-console
|
|
983
|
+
console.log(
|
|
984
|
+
`Skipped document due to its invalid format: ${documentPath}`,
|
|
985
|
+
);
|
|
986
|
+
}
|
|
987
|
+
}),
|
|
988
|
+
);
|
|
989
|
+
|
|
990
|
+
await this.manager.prismicRepository.pushDocuments({
|
|
991
|
+
domain: this.context.repository.domain,
|
|
992
|
+
documents,
|
|
993
|
+
signature,
|
|
994
|
+
});
|
|
995
|
+
|
|
996
|
+
task.title = "Pushed all documents";
|
|
997
|
+
parentTask.title = "Pushed data to Prismic";
|
|
998
|
+
},
|
|
999
|
+
},
|
|
1000
|
+
{
|
|
1001
|
+
title: "Cleaning up data push artifacts",
|
|
1002
|
+
task: async (_, task) => {
|
|
1003
|
+
const root = await this.manager.project.getRoot();
|
|
1004
|
+
const documentsDirectoryPath = path.resolve(root, "documents");
|
|
1005
|
+
try {
|
|
1006
|
+
await fs.rm(documentsDirectoryPath, {
|
|
1007
|
+
force: true,
|
|
1008
|
+
recursive: true,
|
|
1009
|
+
});
|
|
1010
|
+
} catch {
|
|
1011
|
+
// Noop, it's not that big of a deal if we cannot delete this directory
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
task.title = "Cleaned up data push artifacts";
|
|
1015
|
+
parentTask.title = "Pushed data to Prismic";
|
|
1016
|
+
},
|
|
1017
|
+
},
|
|
1018
|
+
]),
|
|
1019
|
+
},
|
|
1020
|
+
]);
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
protected initializeProject(): Promise<void> {
|
|
1024
|
+
return listrRun([
|
|
1025
|
+
{
|
|
1026
|
+
title: "Initializing project...",
|
|
1027
|
+
task: async (_, parentTask) =>
|
|
1028
|
+
// We return another Listr instance in the event we have additional task to perform to initialize the project
|
|
1029
|
+
listr([
|
|
1030
|
+
{
|
|
1031
|
+
title: `Patching ${chalk.cyan("package.json")} scripts...`,
|
|
1032
|
+
task: async (_, task) => {
|
|
1033
|
+
const pkgPath = path.join(this.manager.cwd, "package.json");
|
|
1034
|
+
|
|
1035
|
+
try {
|
|
1036
|
+
const pkgRaw = await fs.readFile(pkgPath, "utf-8");
|
|
1037
|
+
const pkg = JSON.parse(pkgRaw);
|
|
1038
|
+
|
|
1039
|
+
pkg.scripts ||= {};
|
|
1040
|
+
|
|
1041
|
+
if (!pkg.scripts[START_SCRIPT_KEY]) {
|
|
1042
|
+
pkg.scripts[START_SCRIPT_KEY] = START_SCRIPT_VALUE;
|
|
1043
|
+
|
|
1044
|
+
// Cheap indent detection based on https://github.com/sindresorhus/detect-indent (simplified because we're only dealing with JSON here)
|
|
1045
|
+
const firstIndent = pkgRaw
|
|
1046
|
+
.split("\n")
|
|
1047
|
+
.find((line) => line.match(/^(?:( )+|\t+)/));
|
|
1048
|
+
const indent = firstIndent?.match(/^(?:( )+|\t+)/)?.[0];
|
|
1049
|
+
|
|
1050
|
+
await fs.writeFile(
|
|
1051
|
+
pkgPath,
|
|
1052
|
+
JSON.stringify(
|
|
1053
|
+
pkg,
|
|
1054
|
+
null,
|
|
1055
|
+
indent && indent !== " " ? indent : " ",
|
|
1056
|
+
),
|
|
1057
|
+
);
|
|
1058
|
+
} else if (
|
|
1059
|
+
!pkg.scripts["slicemachine"].startsWith(START_SCRIPT_VALUE)
|
|
1060
|
+
) {
|
|
1061
|
+
throw new Error("Script already exists");
|
|
1062
|
+
}
|
|
1063
|
+
} catch (error) {
|
|
1064
|
+
task.title = `Could not patch ${chalk.cyan(
|
|
1065
|
+
"package.json",
|
|
1066
|
+
)} scripts (warning)`;
|
|
1067
|
+
parentTask.title = `Initialized project (could not patch ${chalk.cyan(
|
|
1068
|
+
"package.json",
|
|
1069
|
+
)} scripts)`;
|
|
1070
|
+
|
|
1071
|
+
return;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
this.context.projectInitialization ||= {};
|
|
1075
|
+
this.context.projectInitialization.patchedScript = true;
|
|
1076
|
+
|
|
1077
|
+
task.title = `Patched ${chalk.cyan("package.json")} scripts`;
|
|
1078
|
+
parentTask.title = `Initialized project (patched ${chalk.cyan(
|
|
1079
|
+
"package.json",
|
|
1080
|
+
)} scripts)`;
|
|
1081
|
+
},
|
|
1082
|
+
},
|
|
1083
|
+
]),
|
|
1084
|
+
},
|
|
1085
|
+
]);
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
protected initializePlugins(): Promise<void> {
|
|
1089
|
+
return listrRun([
|
|
1090
|
+
{
|
|
1091
|
+
// TODO: Revert when plugin are introduced to users
|
|
1092
|
+
// title: "Initializing plugins...",
|
|
1093
|
+
title: "Initializing adapter...",
|
|
1094
|
+
task: async (_, task) => {
|
|
1095
|
+
const updateOutput = (data: Buffer | string | null) => {
|
|
1096
|
+
if (data instanceof Buffer) {
|
|
1097
|
+
task.output = data.toString();
|
|
1098
|
+
} else if (typeof data === "string") {
|
|
1099
|
+
task.output = data;
|
|
1100
|
+
}
|
|
1101
|
+
};
|
|
1102
|
+
|
|
1103
|
+
await this.manager.project.initProject({
|
|
1104
|
+
log: updateOutput,
|
|
1105
|
+
});
|
|
1106
|
+
|
|
1107
|
+
// TODO: Revert when plugin are introduced to users
|
|
1108
|
+
// task.title = "Initialized plugins";
|
|
1109
|
+
task.title = "Initialized adapter";
|
|
1110
|
+
},
|
|
1111
|
+
},
|
|
1112
|
+
]);
|
|
1113
|
+
}
|
|
1114
|
+
}
|