@zokugun/artifact 0.7.0 → 0.9.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 +22 -2
- package/lib/cli.js +16 -11
- package/lib/commands/add.js +95 -22
- package/lib/commands/index.d.ts +1 -0
- package/lib/commands/index.js +3 -1
- package/lib/commands/list.js +25 -7
- package/lib/commands/outdated.d.ts +1 -0
- package/lib/commands/outdated.js +73 -0
- package/lib/commands/remove.js +39 -18
- package/lib/commands/update.js +36 -21
- package/lib/compositors/codec.d.ts +3 -0
- package/lib/compositors/codec.js +46 -0
- package/lib/compositors/compose.d.ts +1 -0
- package/lib/compositors/compose.js +4 -0
- package/lib/compositors/index.d.ts +1 -0
- package/lib/compositors/index.js +3 -1
- package/lib/compositors/json.js +3 -66
- package/lib/compositors/rc.js +3 -56
- package/lib/compositors/yaml.js +24 -3
- package/lib/configs/install/read-install-config.d.ts +2 -5
- package/lib/configs/install/read-install-config.js +20 -18
- package/lib/configs/install/write-install-config.d.ts +2 -2
- package/lib/configs/install/write-install-config.js +2 -1
- package/lib/configs/package/read-listing-config.d.ts +7 -0
- package/lib/configs/package/read-listing-config.js +71 -0
- package/lib/configs/package/read-package-config.d.ts +2 -1
- package/lib/configs/package/read-package-config.js +96 -10
- package/lib/configs/utils/constants.d.ts +2 -2
- package/lib/configs/utils/constants.js +2 -2
- package/lib/configs/utils/merge-upsert-property.js +0 -8
- package/lib/configs/utils/normalize-file-always.js +5 -0
- package/lib/configs/utils/normalize-file-upsert.d.ts +2 -1
- package/lib/configs/utils/normalize-file-upsert.js +12 -5
- package/lib/journeys/commitlint/index.d.ts +1 -1
- package/lib/journeys/config.ts/index.d.ts +1 -1
- package/lib/journeys/config.ts/index.js +2 -6
- package/lib/journeys/default/index.d.ts +1 -1
- package/lib/journeys/gitignore/index.d.ts +1 -1
- package/lib/journeys/ignore/index.d.ts +1 -1
- package/lib/journeys/index.d.ts +2 -2
- package/lib/journeys/index.js +9 -11
- package/lib/journeys/npmignore/index.d.ts +1 -1
- package/lib/journeys/package/index.d.ts +1 -1
- package/lib/journeys/rc/index.d.ts +1 -1
- package/lib/journeys/tsconfig/index.d.ts +1 -1
- package/lib/parsers/index.d.ts +4 -0
- package/lib/parsers/index.js +41 -0
- package/lib/parsers/json.d.ts +4 -2
- package/lib/parsers/json.js +7 -2
- package/lib/parsers/jsonc/parse.d.ts +2 -5
- package/lib/parsers/jsonc/parse.js +8 -6
- package/lib/parsers/to-format.d.ts +2 -0
- package/lib/parsers/to-format.js +50 -0
- package/lib/parsers/yaml.d.ts +4 -2
- package/lib/parsers/yaml.js +7 -2
- package/lib/routes/command.js +7 -0
- package/lib/routes/index.d.ts +4 -3
- package/lib/routes/index.js +9 -7
- package/lib/routes/{list-sort-concat.d.ts → list-concat-after.d.ts} +1 -1
- package/lib/routes/{list-sort-concat.js → list-concat-after.js} +2 -2
- package/lib/routes/merge-dot-js.d.ts +2 -0
- package/lib/routes/merge-dot-js.js +8 -0
- package/lib/steps/configure-install-file-actions.js +1 -20
- package/lib/steps/configure-update-file-actions.js +1 -20
- package/lib/steps/execute-first-block.js +1 -1
- package/lib/steps/index.d.ts +0 -2
- package/lib/steps/index.js +4 -3
- package/lib/steps/merge-text-files.d.ts +1 -1
- package/lib/steps/merge-text-files.js +6 -2
- package/lib/steps/read-files.d.ts +1 -1
- package/lib/steps/read-files.js +56 -42
- package/lib/steps/read-incoming-config.js +1 -1
- package/lib/steps/remove-files.d.ts +1 -1
- package/lib/steps/remove-files.js +3 -2
- package/lib/steps/rename-files.d.ts +1 -1
- package/lib/steps/rename-files.js +3 -2
- package/lib/steps/validate-newer-package.d.ts +1 -1
- package/lib/steps/validate-newer-package.js +13 -2
- package/lib/types/config.d.ts +11 -7
- package/lib/types/context.d.ts +23 -3
- package/lib/types/context.js +6 -0
- package/lib/types/travel.d.ts +1 -0
- package/lib/utils/build-journey-plan.d.ts +2 -2
- package/lib/utils/build-route.d.ts +1 -1
- package/lib/utils/build-route.js +50 -19
- package/lib/utils/build-travel-plan.js +1 -0
- package/lib/utils/command/merge-and-chains.js +1 -1
- package/lib/utils/command/merge-command-records.js +1 -1
- package/lib/utils/command/merge-parts-by-prefix.js +12 -1
- package/lib/utils/command/merge-semicolon-segments.js +161 -4
- package/lib/utils/fnmatch.d.ts +1 -0
- package/lib/utils/fnmatch.js +11 -0
- package/lib/utils/format-table.d.ts +1 -0
- package/lib/utils/format-table.js +58 -0
- package/lib/utils/get-format.js +2 -9
- package/lib/utils/load-package.d.ts +6 -0
- package/lib/utils/load-package.js +26 -0
- package/lib/utils/template.js +1 -3
- package/lib/utils/time-difference.d.ts +1 -0
- package/lib/utils/time-difference.js +28 -0
- package/package.json +128 -125
- package/lib/journeys/fixpack/index.d.ts +0 -2
- package/lib/journeys/fixpack/index.js +0 -16
- package/lib/steps/validate-not-present-package.d.ts +0 -3
- package/lib/steps/validate-not-present-package.js +0 -24
- package/lib/utils/try-json.d.ts +0 -1
- package/lib/utils/try-json.js +0 -11
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const is_it_type_1 = require("@zokugun/is-it-type");
|
|
4
|
-
const index_js_1 = require("../../compositors/index.js");
|
|
5
|
-
const index_js_2 = require("../../routes/index.js");
|
|
6
|
-
const build_journey_plan_js_1 = require("../../utils/build-journey-plan.js");
|
|
7
|
-
const build_travel_plan_js_1 = require("../../utils/build-travel-plan.js");
|
|
8
|
-
const mainRoute = (0, index_js_1.mapSort)((0, index_js_1.compose)({
|
|
9
|
-
sortToTop: index_js_2.listSortConcat,
|
|
10
|
-
$$default: (0, index_js_1.fork)([is_it_type_1.isArray, index_js_2.listConcat], [is_it_type_1.isRecord, index_js_2.mapConcat], index_js_2.primitive),
|
|
11
|
-
}));
|
|
12
|
-
const jsonRoute = (0, index_js_1.json)(mainRoute);
|
|
13
|
-
const yamlRoute = (0, index_js_1.yaml)(mainRoute);
|
|
14
|
-
const rcRoute = (0, index_js_1.rc)(mainRoute);
|
|
15
|
-
const travelPlan = (0, build_travel_plan_js_1.buildTravelPlan)([/^\.fixpackrc\.json$/, jsonRoute], [/^\.fixpackrc\.ya?ml$/, yamlRoute], [/^\.fixpackrc$/, rcRoute]);
|
|
16
|
-
exports.default = (0, build_journey_plan_js_1.buildJourneyPlan)(travelPlan);
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateNotPresentPackage = validateNotPresentPackage;
|
|
4
|
-
const cli_utils_1 = require("@zokugun/cli-utils");
|
|
5
|
-
const xtry_1 = require("@zokugun/xtry");
|
|
6
|
-
async function validateNotPresentPackage({ incomingPackage, config, options }) {
|
|
7
|
-
if (options.force) {
|
|
8
|
-
return xtry_1.OK;
|
|
9
|
-
}
|
|
10
|
-
const { name } = incomingPackage;
|
|
11
|
-
const artifact = config.artifacts[name];
|
|
12
|
-
if (artifact) {
|
|
13
|
-
if (options.skip) {
|
|
14
|
-
if (options.verbose) {
|
|
15
|
-
cli_utils_1.logger.debug(`The "${name}" artifact is already present, skipping...`);
|
|
16
|
-
}
|
|
17
|
-
return xtry_1.OK_TRUE;
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
return (0, xtry_1.err)(`The "${name}" artifact has already been added.`);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
return xtry_1.OK;
|
|
24
|
-
}
|
package/lib/utils/try-json.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function tryJSON(value: string): Record<string, unknown> | undefined;
|