@emulsify/cli 1.5.0 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +89 -1
- package/dist/handlers/componentInstall.js +9 -5
- package/dist/handlers/componentList.js +1 -1
- package/dist/handlers/init.js +1 -1
- package/dist/handlers/systemInstall.js +27 -11
- package/dist/index.js +13 -21
- package/dist/node_modules/.package-lock.json +34 -43
- package/dist/node_modules/@types/node/LICENSE +0 -0
- package/dist/node_modules/@types/node/README.md +3 -3
- package/dist/node_modules/@types/node/assert.d.ts +33 -31
- package/dist/node_modules/@types/node/async_hooks.d.ts +29 -21
- package/dist/node_modules/@types/node/buffer.d.ts +67 -3
- package/dist/node_modules/@types/node/child_process.d.ts +230 -62
- package/dist/node_modules/@types/node/cluster.d.ts +62 -27
- package/dist/node_modules/@types/node/console.d.ts +6 -6
- package/dist/node_modules/@types/node/constants.d.ts +12 -11
- package/dist/node_modules/@types/node/crypto.d.ts +338 -240
- package/dist/node_modules/@types/node/dgram.d.ts +50 -14
- package/dist/node_modules/@types/node/dns.d.ts +183 -54
- package/dist/node_modules/@types/node/domain.d.ts +4 -4
- package/dist/node_modules/@types/node/events.d.ts +4 -4
- package/dist/node_modules/@types/node/fs/promises.d.ts +105 -39
- package/dist/node_modules/@types/node/fs.d.ts +440 -126
- package/dist/node_modules/@types/node/globals.d.ts +176 -24
- package/dist/node_modules/@types/node/globals.global.d.ts +0 -0
- package/dist/node_modules/@types/node/http.d.ts +309 -218
- package/dist/node_modules/@types/node/http2.d.ts +345 -98
- package/dist/node_modules/@types/node/https.d.ts +250 -118
- package/dist/node_modules/@types/node/index.d.ts +1 -2
- package/dist/node_modules/@types/node/inspector.d.ts +2 -3
- package/dist/node_modules/@types/node/module.d.ts +4 -4
- package/dist/node_modules/@types/node/net.d.ts +42 -14
- package/dist/node_modules/@types/node/os.d.ts +5 -4
- package/dist/node_modules/@types/node/package.json +10 -8
- package/dist/node_modules/@types/node/path.d.ts +35 -24
- package/dist/node_modules/@types/node/perf_hooks.d.ts +5 -5
- package/dist/node_modules/@types/node/process.d.ts +62 -23
- package/dist/node_modules/@types/node/punycode.d.ts +3 -3
- package/dist/node_modules/@types/node/querystring.d.ts +15 -5
- package/dist/node_modules/@types/node/readline.d.ts +16 -6
- package/dist/node_modules/@types/node/repl.d.ts +13 -7
- package/dist/node_modules/@types/node/stream.d.ts +190 -31
- package/dist/node_modules/@types/node/string_decoder.d.ts +3 -3
- package/dist/node_modules/@types/node/timers.d.ts +6 -6
- package/dist/node_modules/@types/node/tls.d.ts +113 -30
- package/dist/node_modules/@types/node/trace_events.d.ts +3 -3
- package/dist/node_modules/@types/node/ts4.8/assert.d.ts +130 -0
- package/dist/node_modules/@types/node/ts4.8/async_hooks.d.ts +237 -0
- package/dist/node_modules/@types/node/ts4.8/buffer.d.ts +89 -0
- package/dist/node_modules/@types/node/ts4.8/child_process.d.ts +682 -0
- package/dist/node_modules/@types/node/ts4.8/cluster.d.ts +300 -0
- package/dist/node_modules/@types/node/ts4.8/console.d.ts +142 -0
- package/dist/node_modules/@types/node/ts4.8/constants.d.ts +19 -0
- package/dist/node_modules/@types/node/ts4.8/crypto.d.ts +1287 -0
- package/dist/node_modules/@types/node/ts4.8/dgram.d.ts +180 -0
- package/dist/node_modules/@types/node/ts4.8/dns.d.ts +516 -0
- package/dist/node_modules/@types/node/ts4.8/domain.d.ts +27 -0
- package/dist/node_modules/@types/node/ts4.8/events.d.ts +82 -0
- package/dist/node_modules/@types/node/ts4.8/fs/promises.d.ts +634 -0
- package/dist/node_modules/@types/node/ts4.8/fs.d.ts +2587 -0
- package/dist/node_modules/@types/node/ts4.8/globals.d.ts +763 -0
- package/dist/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
- package/dist/node_modules/@types/node/ts4.8/http.d.ts +580 -0
- package/dist/node_modules/@types/node/ts4.8/http2.d.ts +1208 -0
- package/dist/node_modules/@types/node/ts4.8/https.d.ts +274 -0
- package/dist/node_modules/@types/node/ts4.8/index.d.ts +53 -0
- package/dist/node_modules/@types/node/ts4.8/inspector.d.ts +3050 -0
- package/dist/node_modules/@types/node/ts4.8/module.d.ts +56 -0
- package/dist/node_modules/@types/node/ts4.8/net.d.ts +324 -0
- package/dist/node_modules/@types/node/ts4.8/os.d.ts +243 -0
- package/dist/node_modules/@types/node/ts4.8/path.d.ts +168 -0
- package/dist/node_modules/@types/node/ts4.8/perf_hooks.d.ts +274 -0
- package/dist/node_modules/@types/node/ts4.8/process.d.ts +452 -0
- package/dist/node_modules/@types/node/ts4.8/punycode.d.ts +78 -0
- package/dist/node_modules/@types/node/ts4.8/querystring.d.ts +41 -0
- package/dist/node_modules/@types/node/ts4.8/readline.d.ts +184 -0
- package/dist/node_modules/@types/node/ts4.8/repl.d.ts +404 -0
- package/dist/node_modules/@types/node/ts4.8/stream.d.ts +518 -0
- package/dist/node_modules/@types/node/ts4.8/string_decoder.d.ts +10 -0
- package/dist/node_modules/@types/node/ts4.8/timers.d.ts +19 -0
- package/dist/node_modules/@types/node/ts4.8/tls.d.ts +866 -0
- package/dist/node_modules/@types/node/ts4.8/trace_events.d.ts +64 -0
- package/dist/node_modules/@types/node/ts4.8/tty.d.ts +69 -0
- package/dist/node_modules/@types/node/ts4.8/url.d.ts +187 -0
- package/dist/node_modules/@types/node/ts4.8/util.d.ts +278 -0
- package/dist/node_modules/@types/node/ts4.8/v8.d.ts +189 -0
- package/dist/node_modules/@types/node/ts4.8/vm.d.ts +155 -0
- package/dist/node_modules/@types/node/ts4.8/wasi.d.ts +88 -0
- package/dist/node_modules/@types/node/ts4.8/worker_threads.d.ts +241 -0
- package/dist/node_modules/@types/node/ts4.8/zlib.d.ts +364 -0
- package/dist/node_modules/@types/node/tty.d.ts +4 -4
- package/dist/node_modules/@types/node/url.d.ts +75 -7
- package/dist/node_modules/@types/node/util.d.ts +103 -41
- package/dist/node_modules/@types/node/v8.d.ts +4 -5
- package/dist/node_modules/@types/node/vm.d.ts +7 -7
- package/dist/node_modules/@types/node/wasi.d.ts +3 -4
- package/dist/node_modules/@types/node/worker_threads.d.ts +8 -8
- package/dist/node_modules/@types/node/zlib.d.ts +13 -13
- package/dist/node_modules/@types/progress/LICENSE +0 -0
- package/dist/node_modules/@types/progress/README.md +2 -3
- package/dist/node_modules/@types/progress/index.d.ts +0 -5
- package/dist/node_modules/@types/progress/package.json +6 -6
- package/dist/node_modules/ajv-formats/node_modules/ajv/README.md +20 -5
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/2019.d.ts +3 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/2019.js +7 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/2019.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/2020.d.ts +3 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/2020.js +7 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/2020.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/ajv.d.ts +3 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/ajv.js +7 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/ajv.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/code.d.ts +6 -5
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/code.js +9 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/code.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/index.d.ts +2 -2
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/index.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/scope.d.ts +5 -5
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/scope.js +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/scope.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/errors.js +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/errors.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/index.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/index.js +9 -10
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/index.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/jtd/parse.js +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/jtd/parse.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/jtd/serialize.js +19 -8
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/jtd/serialize.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/jtd/types.d.ts +2 -2
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/names.js +6 -6
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/names.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/ref_error.d.ts +2 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/ref_error.js +3 -3
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/ref_error.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/resolve.d.ts +6 -6
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/resolve.js +16 -14
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/resolve.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/rules.d.ts +2 -2
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/util.d.ts +2 -2
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/util.js +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/util.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/boolSchema.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/dataType.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/dataType.js +2 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/dataType.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/defaults.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/index.js +12 -2
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/index.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/keyword.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/subschema.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/subschema.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/core.d.ts +7 -5
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/core.js +22 -18
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/core.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/jtd.d.ts +4 -2
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/jtd.js +7 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/jtd.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/equal.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/parseJson.js +2 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/parseJson.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/re2.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/ucs2length.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/uri.d.ts +6 -0
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/uri.js +6 -0
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/uri.js.map +1 -0
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/standalone/index.js +8 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/standalone/index.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/types/index.d.ts +25 -19
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/types/json-schema.d.ts +15 -14
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/types/jtd-schema.d.ts +31 -25
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/additionalItems.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/anyOf.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/contains.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts +2 -2
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/if.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/if.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/index.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/items.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/not.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/not.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/oneOf.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/propertyNames.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/code.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/core/ref.js +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/core/ref.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/discriminator/index.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/discriminator/index.js +10 -3
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/discriminator/types.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/discriminator/types.js +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/errors.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/format/format.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/format/format.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/discriminator.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/discriminator.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/elements.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/enum.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/enum.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/error.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/index.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/metadata.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/nullable.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/properties.d.ts +3 -3
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/properties.js +8 -5
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/properties.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/ref.js +3 -2
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/ref.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/type.d.ts +3 -3
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/type.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/values.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/values.js +10 -7
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/values.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/const.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/const.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/dependentRequired.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/enum.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/enum.js +4 -3
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/enum.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/index.d.ts +2 -2
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/limitContains.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/limitNumber.d.ts +3 -3
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/multipleOf.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/pattern.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/required.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/required.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/uniqueItems.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/2019.ts +4 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/2020.ts +4 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/ajv.ts +4 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/codegen/code.ts +8 -0
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/codegen/index.ts +25 -5
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/index.ts +8 -8
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/jtd/parse.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/jtd/serialize.ts +21 -15
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/jtd/types.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/ref_error.ts +4 -3
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/resolve.ts +18 -15
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/rules.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/validate/dataType.ts +1 -0
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/validate/index.ts +11 -2
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/core.ts +13 -2
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/jtd.ts +4 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/runtime/parseJson.ts +2 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/runtime/uri.ts +6 -0
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/standalone/index.ts +9 -2
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/types/index.ts +14 -3
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/types/json-schema.ts +2 -4
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/types/jtd-schema.ts +25 -16
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/vocabularies/core/ref.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/vocabularies/discriminator/index.ts +11 -3
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/vocabularies/jtd/properties.ts +13 -6
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/vocabularies/jtd/ref.ts +3 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/vocabularies/jtd/values.ts +10 -7
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/vocabularies/validation/enum.ts +5 -3
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/vocabularies/validation/limitProperties.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/package.json +40 -38
- package/dist/node_modules/commander/Readme.md +407 -169
- package/dist/node_modules/commander/esm.mjs +13 -1
- package/dist/node_modules/commander/index.js +13 -2206
- package/dist/node_modules/commander/lib/argument.js +145 -0
- package/dist/node_modules/commander/lib/command.js +2299 -0
- package/dist/node_modules/commander/lib/error.js +43 -0
- package/dist/node_modules/commander/lib/help.js +457 -0
- package/dist/node_modules/commander/lib/option.js +327 -0
- package/dist/node_modules/commander/lib/suggestSimilar.js +100 -0
- package/dist/node_modules/commander/package.json +46 -34
- package/dist/node_modules/commander/typings/esm.d.mts +3 -0
- package/dist/node_modules/commander/typings/index.d.ts +889 -617
- package/dist/node_modules/debug/README.md +3 -0
- package/dist/node_modules/debug/package.json +1 -1
- package/dist/node_modules/debug/src/common.js +1 -1
- package/dist/node_modules/fs-extra/README.md +3 -5
- package/dist/node_modules/fs-extra/lib/{copy-sync → copy}/copy-sync.js +11 -8
- package/dist/node_modules/fs-extra/lib/copy/copy.js +12 -9
- package/dist/node_modules/fs-extra/lib/copy/index.js +2 -1
- package/dist/node_modules/fs-extra/lib/empty/index.js +10 -19
- package/dist/node_modules/fs-extra/lib/ensure/index.js +15 -15
- package/dist/node_modules/fs-extra/lib/ensure/link.js +10 -7
- package/dist/node_modules/fs-extra/lib/ensure/symlink.js +34 -15
- package/dist/node_modules/fs-extra/lib/fs/index.js +8 -10
- package/dist/node_modules/fs-extra/lib/index.js +1 -12
- package/dist/node_modules/fs-extra/lib/json/output-json-sync.js +1 -1
- package/dist/node_modules/fs-extra/lib/json/output-json.js +1 -1
- package/dist/node_modules/fs-extra/lib/mkdirs/make-dir.js +16 -130
- package/dist/node_modules/fs-extra/lib/mkdirs/utils.js +21 -0
- package/dist/node_modules/fs-extra/lib/move/index.js +2 -1
- package/dist/node_modules/fs-extra/lib/{move-sync → move}/move-sync.js +12 -5
- package/dist/node_modules/fs-extra/lib/move/move.js +14 -4
- package/dist/node_modules/fs-extra/lib/remove/index.js +15 -2
- package/dist/node_modules/fs-extra/lib/util/stat.js +60 -45
- package/dist/node_modules/fs-extra/package.json +7 -10
- package/dist/node_modules/graceful-fs/LICENSE +1 -1
- package/dist/node_modules/graceful-fs/graceful-fs.js +23 -4
- package/dist/node_modules/graceful-fs/package.json +6 -3
- package/dist/node_modules/graceful-fs/polyfills.js +39 -30
- package/dist/node_modules/punycode/README.md +29 -3
- package/dist/node_modules/punycode/package.json +7 -7
- package/dist/node_modules/punycode/punycode.es6.js +25 -22
- package/dist/node_modules/punycode/punycode.js +25 -22
- package/dist/node_modules/ramda/dist/ramda.js +4 -4
- package/dist/node_modules/ramda/dist/ramda.min.js +1 -1
- package/dist/node_modules/ramda/es/trim.js +1 -1
- package/dist/node_modules/ramda/package.json +1 -1
- package/dist/node_modules/ramda/src/trim.js +1 -1
- package/dist/node_modules/universalify/README.md +1 -1
- package/dist/node_modules/universalify/index.js +6 -6
- package/dist/node_modules/universalify/package.json +2 -2
- package/dist/package.json +5 -6
- package/dist/schemas/variant.json +28 -5
- package/dist/util/cache/cloneIntoCache.js +1 -1
- package/dist/util/cache/getCachedItemPath.js +4 -2
- package/dist/util/cache/getJsonFromCachedFile.js +2 -2
- package/dist/util/getGitRepoNameFromUrl.js +1 -1
- package/dist/util/getRepositoryLatestTag.js +16 -0
- package/dist/util/platform/getInitSuccessMessageForPlatform.js +4 -3
- package/dist/util/project/buildComponentDependencyList.js +20 -0
- package/package.json +6 -7
- package/dist/node_modules/at-least-node/LICENSE +0 -6
- package/dist/node_modules/at-least-node/README.md +0 -25
- package/dist/node_modules/at-least-node/index.js +0 -5
- package/dist/node_modules/at-least-node/package.json +0 -32
- package/dist/node_modules/commander/CHANGELOG.md +0 -440
- package/dist/node_modules/fs-extra/CHANGELOG.md +0 -902
- package/dist/node_modules/fs-extra/lib/copy-sync/index.js +0 -5
- package/dist/node_modules/fs-extra/lib/move-sync/index.js +0 -5
- /package/dist/node_modules/fs-extra/lib/{output → output-file}/index.js +0 -0
|
@@ -241,6 +241,9 @@ setInterval(function(){
|
|
|
241
241
|
}, 1200);
|
|
242
242
|
```
|
|
243
243
|
|
|
244
|
+
In Chromium-based web browsers (e.g. Brave, Chrome, and Electron), the JavaScript console will—by default—only show messages logged by `debug` if the "Verbose" log level is _enabled_.
|
|
245
|
+
|
|
246
|
+
<img width="647" src="https://user-images.githubusercontent.com/7143133/152083257-29034707-c42c-4959-8add-3cee850e6fcf.png">
|
|
244
247
|
|
|
245
248
|
## Output streams
|
|
246
249
|
|
|
@@ -179,7 +179,7 @@ function setup(env) {
|
|
|
179
179
|
namespaces = split[i].replace(/\*/g, '.*?');
|
|
180
180
|
|
|
181
181
|
if (namespaces[0] === '-') {
|
|
182
|
-
createDebug.skips.push(new RegExp('^' + namespaces.
|
|
182
|
+
createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
|
|
183
183
|
} else {
|
|
184
184
|
createDebug.names.push(new RegExp('^' + namespaces + '$'));
|
|
185
185
|
}
|
|
@@ -4,11 +4,9 @@ Node.js: fs-extra
|
|
|
4
4
|
`fs-extra` adds file system methods that aren't included in the native `fs` module and adds promise support to the `fs` methods. It also uses [`graceful-fs`](https://github.com/isaacs/node-graceful-fs) to prevent `EMFILE` errors. It should be a drop in replacement for `fs`.
|
|
5
5
|
|
|
6
6
|
[](https://www.npmjs.org/package/fs-extra)
|
|
7
|
-
[](https://ci.appveyor.com/project/jprichardson/node-fs-extra/branch/master)
|
|
7
|
+
[](https://github.com/jprichardson/node-fs-extra/blob/master/LICENSE)
|
|
8
|
+
[](https://github.com/jprichardson/node-fs-extra/actions/workflows/ci.yml?query=branch%3Amaster)
|
|
10
9
|
[](https://www.npmjs.org/package/fs-extra)
|
|
11
|
-
[](https://coveralls.io/github/jprichardson/node-fs-extra)
|
|
12
10
|
[](https://standardjs.com)
|
|
13
11
|
|
|
14
12
|
Why?
|
|
@@ -189,7 +187,7 @@ you're gonna have to get over it :) If `standard` is good enough for `npm`, it's
|
|
|
189
187
|
What's needed?
|
|
190
188
|
- First, take a look at existing issues. Those are probably going to be where the priority lies.
|
|
191
189
|
- More tests for edge cases. Specifically on different platforms. There can never be enough tests.
|
|
192
|
-
- Improve test coverage.
|
|
190
|
+
- Improve test coverage.
|
|
193
191
|
|
|
194
192
|
Note: If you make any big changes, **you should definitely file an issue for discussion first.**
|
|
195
193
|
|
|
@@ -17,11 +17,14 @@ function copySync (src, dest, opts) {
|
|
|
17
17
|
|
|
18
18
|
// Warn about using preserveTimestamps on 32-bit node
|
|
19
19
|
if (opts.preserveTimestamps && process.arch === 'ia32') {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
process.emitWarning(
|
|
21
|
+
'Using the preserveTimestamps option in 32-bit node is not recommended;\n\n' +
|
|
22
|
+
'\tsee https://github.com/jprichardson/node-fs-extra/issues/269',
|
|
23
|
+
'Warning', 'fs-extra-WARN0002'
|
|
24
|
+
)
|
|
22
25
|
}
|
|
23
26
|
|
|
24
|
-
const { srcStat, destStat } = stat.checkPathsSync(src, dest, 'copy')
|
|
27
|
+
const { srcStat, destStat } = stat.checkPathsSync(src, dest, 'copy', opts)
|
|
25
28
|
stat.checkParentPathsSync(src, srcStat, dest, 'copy')
|
|
26
29
|
return handleFilterAndCopy(destStat, src, dest, opts)
|
|
27
30
|
}
|
|
@@ -30,7 +33,7 @@ function handleFilterAndCopy (destStat, src, dest, opts) {
|
|
|
30
33
|
if (opts.filter && !opts.filter(src, dest)) return
|
|
31
34
|
const destParent = path.dirname(dest)
|
|
32
35
|
if (!fs.existsSync(destParent)) mkdirsSync(destParent)
|
|
33
|
-
return
|
|
36
|
+
return getStats(destStat, src, dest, opts)
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
function startCopy (destStat, src, dest, opts) {
|
|
@@ -47,6 +50,9 @@ function getStats (destStat, src, dest, opts) {
|
|
|
47
50
|
srcStat.isCharacterDevice() ||
|
|
48
51
|
srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts)
|
|
49
52
|
else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts)
|
|
53
|
+
else if (srcStat.isSocket()) throw new Error(`Cannot copy a socket file: ${src}`)
|
|
54
|
+
else if (srcStat.isFIFO()) throw new Error(`Cannot copy a FIFO pipe: ${src}`)
|
|
55
|
+
throw new Error(`Unknown file: ${src}`)
|
|
50
56
|
}
|
|
51
57
|
|
|
52
58
|
function onFile (srcStat, destStat, src, dest, opts) {
|
|
@@ -99,9 +105,6 @@ function setDestTimestamps (src, dest) {
|
|
|
99
105
|
|
|
100
106
|
function onDir (srcStat, destStat, src, dest, opts) {
|
|
101
107
|
if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts)
|
|
102
|
-
if (destStat && !destStat.isDirectory()) {
|
|
103
|
-
throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)
|
|
104
|
-
}
|
|
105
108
|
return copyDir(src, dest, opts)
|
|
106
109
|
}
|
|
107
110
|
|
|
@@ -118,7 +121,7 @@ function copyDir (src, dest, opts) {
|
|
|
118
121
|
function copyDirItem (item, src, dest, opts) {
|
|
119
122
|
const srcItem = path.join(src, item)
|
|
120
123
|
const destItem = path.join(dest, item)
|
|
121
|
-
const { destStat } = stat.checkPathsSync(srcItem, destItem, 'copy')
|
|
124
|
+
const { destStat } = stat.checkPathsSync(srcItem, destItem, 'copy', opts)
|
|
122
125
|
return startCopy(destStat, srcItem, destItem, opts)
|
|
123
126
|
}
|
|
124
127
|
|
|
@@ -23,11 +23,14 @@ function copy (src, dest, opts, cb) {
|
|
|
23
23
|
|
|
24
24
|
// Warn about using preserveTimestamps on 32-bit node
|
|
25
25
|
if (opts.preserveTimestamps && process.arch === 'ia32') {
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
process.emitWarning(
|
|
27
|
+
'Using the preserveTimestamps option in 32-bit node is not recommended;\n\n' +
|
|
28
|
+
'\tsee https://github.com/jprichardson/node-fs-extra/issues/269',
|
|
29
|
+
'Warning', 'fs-extra-WARN0001'
|
|
30
|
+
)
|
|
28
31
|
}
|
|
29
32
|
|
|
30
|
-
stat.checkPaths(src, dest, 'copy', (err, stats) => {
|
|
33
|
+
stat.checkPaths(src, dest, 'copy', opts, (err, stats) => {
|
|
31
34
|
if (err) return cb(err)
|
|
32
35
|
const { srcStat, destStat } = stats
|
|
33
36
|
stat.checkParentPaths(src, srcStat, dest, 'copy', err => {
|
|
@@ -42,10 +45,10 @@ function checkParentDir (destStat, src, dest, opts, cb) {
|
|
|
42
45
|
const destParent = path.dirname(dest)
|
|
43
46
|
pathExists(destParent, (err, dirExists) => {
|
|
44
47
|
if (err) return cb(err)
|
|
45
|
-
if (dirExists) return
|
|
48
|
+
if (dirExists) return getStats(destStat, src, dest, opts, cb)
|
|
46
49
|
mkdirs(destParent, err => {
|
|
47
50
|
if (err) return cb(err)
|
|
48
|
-
return
|
|
51
|
+
return getStats(destStat, src, dest, opts, cb)
|
|
49
52
|
})
|
|
50
53
|
})
|
|
51
54
|
}
|
|
@@ -72,6 +75,9 @@ function getStats (destStat, src, dest, opts, cb) {
|
|
|
72
75
|
srcStat.isCharacterDevice() ||
|
|
73
76
|
srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts, cb)
|
|
74
77
|
else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts, cb)
|
|
78
|
+
else if (srcStat.isSocket()) return cb(new Error(`Cannot copy a socket file: ${src}`))
|
|
79
|
+
else if (srcStat.isFIFO()) return cb(new Error(`Cannot copy a FIFO pipe: ${src}`))
|
|
80
|
+
return cb(new Error(`Unknown file: ${src}`))
|
|
75
81
|
})
|
|
76
82
|
}
|
|
77
83
|
|
|
@@ -143,9 +149,6 @@ function setDestTimestamps (src, dest, cb) {
|
|
|
143
149
|
|
|
144
150
|
function onDir (srcStat, destStat, src, dest, opts, cb) {
|
|
145
151
|
if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts, cb)
|
|
146
|
-
if (destStat && !destStat.isDirectory()) {
|
|
147
|
-
return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`))
|
|
148
|
-
}
|
|
149
152
|
return copyDir(src, dest, opts, cb)
|
|
150
153
|
}
|
|
151
154
|
|
|
@@ -175,7 +178,7 @@ function copyDirItems (items, src, dest, opts, cb) {
|
|
|
175
178
|
function copyDirItem (items, item, src, dest, opts, cb) {
|
|
176
179
|
const srcItem = path.join(src, item)
|
|
177
180
|
const destItem = path.join(dest, item)
|
|
178
|
-
stat.checkPaths(srcItem, destItem, 'copy', (err, stats) => {
|
|
181
|
+
stat.checkPaths(srcItem, destItem, 'copy', opts, (err, stats) => {
|
|
179
182
|
if (err) return cb(err)
|
|
180
183
|
const { destStat } = stats
|
|
181
184
|
startCopy(destStat, srcItem, destItem, opts, err => {
|
|
@@ -1,29 +1,20 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
const u = require('universalify').
|
|
4
|
-
const fs = require('
|
|
3
|
+
const u = require('universalify').fromPromise
|
|
4
|
+
const fs = require('../fs')
|
|
5
5
|
const path = require('path')
|
|
6
6
|
const mkdir = require('../mkdirs')
|
|
7
7
|
const remove = require('../remove')
|
|
8
8
|
|
|
9
|
-
const emptyDir = u(function emptyDir (dir
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
deleteItem()
|
|
9
|
+
const emptyDir = u(async function emptyDir (dir) {
|
|
10
|
+
let items
|
|
11
|
+
try {
|
|
12
|
+
items = await fs.readdir(dir)
|
|
13
|
+
} catch {
|
|
14
|
+
return mkdir.mkdirs(dir)
|
|
15
|
+
}
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
const item = items.pop()
|
|
20
|
-
if (!item) return callback()
|
|
21
|
-
remove.remove(item, err => {
|
|
22
|
-
if (err) return callback(err)
|
|
23
|
-
deleteItem()
|
|
24
|
-
})
|
|
25
|
-
}
|
|
26
|
-
})
|
|
17
|
+
return Promise.all(items.map(item => remove.remove(path.join(dir, item))))
|
|
27
18
|
})
|
|
28
19
|
|
|
29
20
|
function emptyDirSync (dir) {
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
3
|
+
const { createFile, createFileSync } = require('./file')
|
|
4
|
+
const { createLink, createLinkSync } = require('./link')
|
|
5
|
+
const { createSymlink, createSymlinkSync } = require('./symlink')
|
|
6
6
|
|
|
7
7
|
module.exports = {
|
|
8
8
|
// file
|
|
9
|
-
createFile
|
|
10
|
-
createFileSync
|
|
11
|
-
ensureFile:
|
|
12
|
-
ensureFileSync:
|
|
9
|
+
createFile,
|
|
10
|
+
createFileSync,
|
|
11
|
+
ensureFile: createFile,
|
|
12
|
+
ensureFileSync: createFileSync,
|
|
13
13
|
// link
|
|
14
|
-
createLink
|
|
15
|
-
createLinkSync
|
|
16
|
-
ensureLink:
|
|
17
|
-
ensureLinkSync:
|
|
14
|
+
createLink,
|
|
15
|
+
createLinkSync,
|
|
16
|
+
ensureLink: createLink,
|
|
17
|
+
ensureLinkSync: createLinkSync,
|
|
18
18
|
// symlink
|
|
19
|
-
createSymlink
|
|
20
|
-
createSymlinkSync
|
|
21
|
-
ensureSymlink:
|
|
22
|
-
ensureSymlinkSync:
|
|
19
|
+
createSymlink,
|
|
20
|
+
createSymlinkSync,
|
|
21
|
+
ensureSymlink: createSymlink,
|
|
22
|
+
ensureSymlinkSync: createSymlinkSync
|
|
23
23
|
}
|
|
@@ -5,6 +5,7 @@ const path = require('path')
|
|
|
5
5
|
const fs = require('graceful-fs')
|
|
6
6
|
const mkdir = require('../mkdirs')
|
|
7
7
|
const pathExists = require('../path-exists').pathExists
|
|
8
|
+
const { areIdentical } = require('../util/stat')
|
|
8
9
|
|
|
9
10
|
function createLink (srcpath, dstpath, callback) {
|
|
10
11
|
function makeLink (srcpath, dstpath) {
|
|
@@ -14,14 +15,13 @@ function createLink (srcpath, dstpath, callback) {
|
|
|
14
15
|
})
|
|
15
16
|
}
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
if (destinationExists) return callback(null)
|
|
20
|
-
fs.lstat(srcpath, (err) => {
|
|
18
|
+
fs.lstat(dstpath, (_, dstStat) => {
|
|
19
|
+
fs.lstat(srcpath, (err, srcStat) => {
|
|
21
20
|
if (err) {
|
|
22
21
|
err.message = err.message.replace('lstat', 'ensureLink')
|
|
23
22
|
return callback(err)
|
|
24
23
|
}
|
|
24
|
+
if (dstStat && areIdentical(srcStat, dstStat)) return callback(null)
|
|
25
25
|
|
|
26
26
|
const dir = path.dirname(dstpath)
|
|
27
27
|
pathExists(dir, (err, dirExists) => {
|
|
@@ -37,11 +37,14 @@ function createLink (srcpath, dstpath, callback) {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
function createLinkSync (srcpath, dstpath) {
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
let dstStat
|
|
41
|
+
try {
|
|
42
|
+
dstStat = fs.lstatSync(dstpath)
|
|
43
|
+
} catch {}
|
|
42
44
|
|
|
43
45
|
try {
|
|
44
|
-
fs.lstatSync(srcpath)
|
|
46
|
+
const srcStat = fs.lstatSync(srcpath)
|
|
47
|
+
if (dstStat && areIdentical(srcStat, dstStat)) return
|
|
45
48
|
} catch (err) {
|
|
46
49
|
err.message = err.message.replace('lstat', 'ensureLink')
|
|
47
50
|
throw err
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const u = require('universalify').fromCallback
|
|
4
4
|
const path = require('path')
|
|
5
|
-
const fs = require('
|
|
5
|
+
const fs = require('../fs')
|
|
6
6
|
const _mkdirs = require('../mkdirs')
|
|
7
7
|
const mkdirs = _mkdirs.mkdirs
|
|
8
8
|
const mkdirsSync = _mkdirs.mkdirsSync
|
|
@@ -17,26 +17,38 @@ const symlinkTypeSync = _symlinkType.symlinkTypeSync
|
|
|
17
17
|
|
|
18
18
|
const pathExists = require('../path-exists').pathExists
|
|
19
19
|
|
|
20
|
+
const { areIdentical } = require('../util/stat')
|
|
21
|
+
|
|
20
22
|
function createSymlink (srcpath, dstpath, type, callback) {
|
|
21
23
|
callback = (typeof type === 'function') ? type : callback
|
|
22
24
|
type = (typeof type === 'function') ? false : type
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
fs.lstat(dstpath, (err, stats) => {
|
|
27
|
+
if (!err && stats.isSymbolicLink()) {
|
|
28
|
+
Promise.all([
|
|
29
|
+
fs.stat(srcpath),
|
|
30
|
+
fs.stat(dstpath)
|
|
31
|
+
]).then(([srcStat, dstStat]) => {
|
|
32
|
+
if (areIdentical(srcStat, dstStat)) return callback(null)
|
|
33
|
+
_createSymlink(srcpath, dstpath, type, callback)
|
|
34
|
+
})
|
|
35
|
+
} else _createSymlink(srcpath, dstpath, type, callback)
|
|
36
|
+
})
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function _createSymlink (srcpath, dstpath, type, callback) {
|
|
40
|
+
symlinkPaths(srcpath, dstpath, (err, relative) => {
|
|
25
41
|
if (err) return callback(err)
|
|
26
|
-
|
|
27
|
-
|
|
42
|
+
srcpath = relative.toDst
|
|
43
|
+
symlinkType(relative.toCwd, type, (err, type) => {
|
|
28
44
|
if (err) return callback(err)
|
|
29
|
-
|
|
30
|
-
|
|
45
|
+
const dir = path.dirname(dstpath)
|
|
46
|
+
pathExists(dir, (err, dirExists) => {
|
|
31
47
|
if (err) return callback(err)
|
|
32
|
-
|
|
33
|
-
|
|
48
|
+
if (dirExists) return fs.symlink(srcpath, dstpath, type, callback)
|
|
49
|
+
mkdirs(dir, err => {
|
|
34
50
|
if (err) return callback(err)
|
|
35
|
-
|
|
36
|
-
mkdirs(dir, err => {
|
|
37
|
-
if (err) return callback(err)
|
|
38
|
-
fs.symlink(srcpath, dstpath, type, callback)
|
|
39
|
-
})
|
|
51
|
+
fs.symlink(srcpath, dstpath, type, callback)
|
|
40
52
|
})
|
|
41
53
|
})
|
|
42
54
|
})
|
|
@@ -44,8 +56,15 @@ function createSymlink (srcpath, dstpath, type, callback) {
|
|
|
44
56
|
}
|
|
45
57
|
|
|
46
58
|
function createSymlinkSync (srcpath, dstpath, type) {
|
|
47
|
-
|
|
48
|
-
|
|
59
|
+
let stats
|
|
60
|
+
try {
|
|
61
|
+
stats = fs.lstatSync(dstpath)
|
|
62
|
+
} catch {}
|
|
63
|
+
if (stats && stats.isSymbolicLink()) {
|
|
64
|
+
const srcStat = fs.statSync(srcpath)
|
|
65
|
+
const dstStat = fs.statSync(dstpath)
|
|
66
|
+
if (areIdentical(srcStat, dstStat)) return
|
|
67
|
+
}
|
|
49
68
|
|
|
50
69
|
const relative = symlinkPathsSync(srcpath, dstpath)
|
|
51
70
|
srcpath = relative.toDst
|
|
@@ -47,15 +47,8 @@ const api = [
|
|
|
47
47
|
return typeof fs[key] === 'function'
|
|
48
48
|
})
|
|
49
49
|
|
|
50
|
-
// Export
|
|
51
|
-
Object.
|
|
52
|
-
if (key === 'promises') {
|
|
53
|
-
// fs.promises is a getter property that triggers ExperimentalWarning
|
|
54
|
-
// Don't re-export it here, the getter is defined in "lib/index.js"
|
|
55
|
-
return
|
|
56
|
-
}
|
|
57
|
-
exports[key] = fs[key]
|
|
58
|
-
})
|
|
50
|
+
// Export cloned fs:
|
|
51
|
+
Object.assign(exports, fs)
|
|
59
52
|
|
|
60
53
|
// Universalify async methods:
|
|
61
54
|
api.forEach(method => {
|
|
@@ -124,7 +117,12 @@ if (typeof fs.writev === 'function') {
|
|
|
124
117
|
}
|
|
125
118
|
}
|
|
126
119
|
|
|
127
|
-
// fs.realpath.native
|
|
120
|
+
// fs.realpath.native sometimes not available if fs is monkey-patched
|
|
128
121
|
if (typeof fs.realpath.native === 'function') {
|
|
129
122
|
exports.realpath.native = u(fs.realpath.native)
|
|
123
|
+
} else {
|
|
124
|
+
process.emitWarning(
|
|
125
|
+
'fs.realpath.native is not a function. Is fs being monkey-patched?',
|
|
126
|
+
'Warning', 'fs-extra-WARN0003'
|
|
127
|
+
)
|
|
130
128
|
}
|
|
@@ -4,24 +4,13 @@ module.exports = {
|
|
|
4
4
|
// Export promiseified graceful-fs:
|
|
5
5
|
...require('./fs'),
|
|
6
6
|
// Export extra methods:
|
|
7
|
-
...require('./copy-sync'),
|
|
8
7
|
...require('./copy'),
|
|
9
8
|
...require('./empty'),
|
|
10
9
|
...require('./ensure'),
|
|
11
10
|
...require('./json'),
|
|
12
11
|
...require('./mkdirs'),
|
|
13
|
-
...require('./move-sync'),
|
|
14
12
|
...require('./move'),
|
|
15
|
-
...require('./output'),
|
|
13
|
+
...require('./output-file'),
|
|
16
14
|
...require('./path-exists'),
|
|
17
15
|
...require('./remove')
|
|
18
16
|
}
|
|
19
|
-
|
|
20
|
-
// Export fs.promises as a getter property so that we don't trigger
|
|
21
|
-
// ExperimentalWarning before fs.promises is actually accessed.
|
|
22
|
-
const fs = require('fs')
|
|
23
|
-
if (Object.getOwnPropertyDescriptor(fs, 'promises')) {
|
|
24
|
-
Object.defineProperty(module.exports, 'promises', {
|
|
25
|
-
get () { return fs.promises }
|
|
26
|
-
})
|
|
27
|
-
}
|
|
@@ -1,141 +1,27 @@
|
|
|
1
|
-
// Adapted from https://github.com/sindresorhus/make-dir
|
|
2
|
-
// Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
3
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
-
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
5
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
6
1
|
'use strict'
|
|
7
2
|
const fs = require('../fs')
|
|
8
|
-
const
|
|
9
|
-
const atLeastNode = require('at-least-node')
|
|
3
|
+
const { checkPath } = require('./utils')
|
|
10
4
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
// https://github.com/nodejs/node/issues/8987
|
|
14
|
-
// https://github.com/libuv/libuv/pull/1088
|
|
15
|
-
const checkPath = pth => {
|
|
16
|
-
if (process.platform === 'win32') {
|
|
17
|
-
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, ''))
|
|
18
|
-
|
|
19
|
-
if (pathHasInvalidWinCharacters) {
|
|
20
|
-
const error = new Error(`Path contains invalid characters: ${pth}`)
|
|
21
|
-
error.code = 'EINVAL'
|
|
22
|
-
throw error
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const processOptions = options => {
|
|
5
|
+
const getMode = options => {
|
|
28
6
|
const defaults = { mode: 0o777 }
|
|
29
|
-
if (typeof options === 'number')
|
|
30
|
-
return { ...defaults, ...options }
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const permissionError = pth => {
|
|
34
|
-
// This replicates the exception of `fs.mkdir` with native the
|
|
35
|
-
// `recusive` option when run on an invalid drive under Windows.
|
|
36
|
-
const error = new Error(`operation not permitted, mkdir '${pth}'`)
|
|
37
|
-
error.code = 'EPERM'
|
|
38
|
-
error.errno = -4048
|
|
39
|
-
error.path = pth
|
|
40
|
-
error.syscall = 'mkdir'
|
|
41
|
-
return error
|
|
7
|
+
if (typeof options === 'number') return options
|
|
8
|
+
return ({ ...defaults, ...options }).mode
|
|
42
9
|
}
|
|
43
10
|
|
|
44
|
-
module.exports.makeDir = async (
|
|
45
|
-
checkPath(
|
|
46
|
-
options = processOptions(options)
|
|
47
|
-
|
|
48
|
-
if (useNativeRecursiveOption) {
|
|
49
|
-
const pth = path.resolve(input)
|
|
50
|
-
|
|
51
|
-
return fs.mkdir(pth, {
|
|
52
|
-
mode: options.mode,
|
|
53
|
-
recursive: true
|
|
54
|
-
})
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
const make = async pth => {
|
|
58
|
-
try {
|
|
59
|
-
await fs.mkdir(pth, options.mode)
|
|
60
|
-
} catch (error) {
|
|
61
|
-
if (error.code === 'EPERM') {
|
|
62
|
-
throw error
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
if (error.code === 'ENOENT') {
|
|
66
|
-
if (path.dirname(pth) === pth) {
|
|
67
|
-
throw permissionError(pth)
|
|
68
|
-
}
|
|
11
|
+
module.exports.makeDir = async (dir, options) => {
|
|
12
|
+
checkPath(dir)
|
|
69
13
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
await make(path.dirname(pth))
|
|
75
|
-
return make(pth)
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
try {
|
|
79
|
-
const stats = await fs.stat(pth)
|
|
80
|
-
if (!stats.isDirectory()) {
|
|
81
|
-
// This error is never exposed to the user
|
|
82
|
-
// it is caught below, and the original error is thrown
|
|
83
|
-
throw new Error('The path is not a directory')
|
|
84
|
-
}
|
|
85
|
-
} catch {
|
|
86
|
-
throw error
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
return make(path.resolve(input))
|
|
14
|
+
return fs.mkdir(dir, {
|
|
15
|
+
mode: getMode(options),
|
|
16
|
+
recursive: true
|
|
17
|
+
})
|
|
92
18
|
}
|
|
93
19
|
|
|
94
|
-
module.exports.makeDirSync = (
|
|
95
|
-
checkPath(
|
|
96
|
-
options = processOptions(options)
|
|
97
|
-
|
|
98
|
-
if (useNativeRecursiveOption) {
|
|
99
|
-
const pth = path.resolve(input)
|
|
100
|
-
|
|
101
|
-
return fs.mkdirSync(pth, {
|
|
102
|
-
mode: options.mode,
|
|
103
|
-
recursive: true
|
|
104
|
-
})
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
const make = pth => {
|
|
108
|
-
try {
|
|
109
|
-
fs.mkdirSync(pth, options.mode)
|
|
110
|
-
} catch (error) {
|
|
111
|
-
if (error.code === 'EPERM') {
|
|
112
|
-
throw error
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
if (error.code === 'ENOENT') {
|
|
116
|
-
if (path.dirname(pth) === pth) {
|
|
117
|
-
throw permissionError(pth)
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
if (error.message.includes('null bytes')) {
|
|
121
|
-
throw error
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
make(path.dirname(pth))
|
|
125
|
-
return make(pth)
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
try {
|
|
129
|
-
if (!fs.statSync(pth).isDirectory()) {
|
|
130
|
-
// This error is never exposed to the user
|
|
131
|
-
// it is caught below, and the original error is thrown
|
|
132
|
-
throw new Error('The path is not a directory')
|
|
133
|
-
}
|
|
134
|
-
} catch {
|
|
135
|
-
throw error
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
20
|
+
module.exports.makeDirSync = (dir, options) => {
|
|
21
|
+
checkPath(dir)
|
|
139
22
|
|
|
140
|
-
return
|
|
23
|
+
return fs.mkdirSync(dir, {
|
|
24
|
+
mode: getMode(options),
|
|
25
|
+
recursive: true
|
|
26
|
+
})
|
|
141
27
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Adapted from https://github.com/sindresorhus/make-dir
|
|
2
|
+
// Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
3
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
5
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
6
|
+
'use strict'
|
|
7
|
+
const path = require('path')
|
|
8
|
+
|
|
9
|
+
// https://github.com/nodejs/node/issues/8987
|
|
10
|
+
// https://github.com/libuv/libuv/pull/1088
|
|
11
|
+
module.exports.checkPath = function checkPath (pth) {
|
|
12
|
+
if (process.platform === 'win32') {
|
|
13
|
+
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, ''))
|
|
14
|
+
|
|
15
|
+
if (pathHasInvalidWinCharacters) {
|
|
16
|
+
const error = new Error(`Path contains invalid characters: ${pth}`)
|
|
17
|
+
error.code = 'EINVAL'
|
|
18
|
+
throw error
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|