@cyberskill/shared 1.48.0 → 1.49.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/dist/_tsup-dts-rollup.d.cts +5 -0
- package/dist/_tsup-dts-rollup.d.ts +5 -0
- package/dist/cli.cjs +17 -9
- package/dist/cli.js +16 -8
- package/dist/configs/vitest/react/unit.cjs +1 -1
- package/dist/constants/index.cjs +1 -1
- package/dist/constants/path.cjs +1 -1
- package/dist/index.cjs +15 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +11 -1
- package/dist/utils/command.cjs +1 -1
- package/dist/utils/fs.cjs +14 -0
- package/dist/utils/fs.d.cts +1 -0
- package/dist/utils/fs.d.ts +1 -0
- package/dist/utils/fs.js +11 -1
- package/dist/utils/index-nodejs.cjs +15 -1
- package/dist/utils/index-nodejs.d.cts +1 -0
- package/dist/utils/index-nodejs.d.ts +1 -0
- package/dist/utils/index-nodejs.js +11 -1
- package/dist/utils/package.cjs +1 -1
- package/dist/utils/path.cjs +1 -1
- package/dist/utils/storage-server.cjs +1 -1
- package/package.json +1 -2
|
@@ -7236,6 +7236,11 @@ export { RIMRAF_CLI }
|
|
|
7236
7236
|
export { RIMRAF_CLI as RIMRAF_CLI_alias_1 }
|
|
7237
7237
|
export { RIMRAF_CLI as RIMRAF_CLI_alias_2 }
|
|
7238
7238
|
|
|
7239
|
+
declare function rmSync(filePaths: string[]): void;
|
|
7240
|
+
export { rmSync }
|
|
7241
|
+
export { rmSync as rmSync_alias_1 }
|
|
7242
|
+
export { rmSync as rmSync_alias_2 }
|
|
7243
|
+
|
|
7239
7244
|
declare function saveErrorListToStorage(errorList: I_ErrorEntry_2[]): Promise<void>;
|
|
7240
7245
|
export { saveErrorListToStorage }
|
|
7241
7246
|
export { saveErrorListToStorage as saveErrorListToStorage_alias_1 }
|
|
@@ -7236,6 +7236,11 @@ export { RIMRAF_CLI }
|
|
|
7236
7236
|
export { RIMRAF_CLI as RIMRAF_CLI_alias_1 }
|
|
7237
7237
|
export { RIMRAF_CLI as RIMRAF_CLI_alias_2 }
|
|
7238
7238
|
|
|
7239
|
+
declare function rmSync(filePaths: string[]): void;
|
|
7240
|
+
export { rmSync }
|
|
7241
|
+
export { rmSync as rmSync_alias_1 }
|
|
7242
|
+
export { rmSync as rmSync_alias_2 }
|
|
7243
|
+
|
|
7239
7244
|
declare function saveErrorListToStorage(errorList: I_ErrorEntry_2[]): Promise<void>;
|
|
7240
7245
|
export { saveErrorListToStorage }
|
|
7241
7246
|
export { saveErrorListToStorage as saveErrorListToStorage_alias_1 }
|
package/dist/cli.cjs
CHANGED
|
@@ -307,7 +307,7 @@ __export(cli_exports, {
|
|
|
307
307
|
}
|
|
308
308
|
});
|
|
309
309
|
module.exports = __toCommonJS(cli_exports);
|
|
310
|
-
// node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.2_@types+node@22.13.
|
|
310
|
+
// node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.2_@types+node@22.13.17__@swc+core@1.11.16_@swc_95e38cac10676cdf66b55e0093c30cae/node_modules/tsup/assets/cjs_shims.js
|
|
311
311
|
var getImportMetaUrl = function() {
|
|
312
312
|
return typeof document === "undefined" ? new URL("file:".concat(__filename)).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
313
313
|
};
|
|
@@ -359,6 +359,16 @@ function appendFileSync2(filePath, data) {
|
|
|
359
359
|
var content = isJson && (typeof data === "undefined" ? "undefined" : _type_of(data)) === "object" ? JSON.stringify(data, null, 4) : String(data);
|
|
360
360
|
fs.appendFileSync(filePath, content, "utf-8");
|
|
361
361
|
}
|
|
362
|
+
function rmSync2(filePaths) {
|
|
363
|
+
filePaths.forEach(function(filePath) {
|
|
364
|
+
if (existsSync2(filePath)) {
|
|
365
|
+
fs.rmSync(filePath, {
|
|
366
|
+
recursive: true,
|
|
367
|
+
force: true
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
});
|
|
371
|
+
}
|
|
362
372
|
// src/utils/path.ts
|
|
363
373
|
var import_node_module = require("module");
|
|
364
374
|
var path = __toESM(require("path"), 1);
|
|
@@ -2037,23 +2047,21 @@ function _reset() {
|
|
|
2037
2047
|
return _ts_generator(this, function(_state) {
|
|
2038
2048
|
switch(_state.label){
|
|
2039
2049
|
case 0:
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
];
|
|
2044
|
-
case 1:
|
|
2045
|
-
_state.sent();
|
|
2050
|
+
rmSync2([
|
|
2051
|
+
PATH.NODE_MODULES,
|
|
2052
|
+
PATH.PNPM_LOCK_YAML
|
|
2053
|
+
]);
|
|
2046
2054
|
return [
|
|
2047
2055
|
4,
|
|
2048
2056
|
installDependencies()
|
|
2049
2057
|
];
|
|
2050
|
-
case
|
|
2058
|
+
case 1:
|
|
2051
2059
|
_state.sent();
|
|
2052
2060
|
return [
|
|
2053
2061
|
4,
|
|
2054
2062
|
setupGitHook()
|
|
2055
2063
|
];
|
|
2056
|
-
case
|
|
2064
|
+
case 2:
|
|
2057
2065
|
_state.sent();
|
|
2058
2066
|
return [
|
|
2059
2067
|
2
|
package/dist/cli.js
CHANGED
|
@@ -284,6 +284,16 @@ function appendFileSync2(filePath, data) {
|
|
|
284
284
|
var content = isJson && (typeof data === "undefined" ? "undefined" : _type_of(data)) === "object" ? JSON.stringify(data, null, 4) : String(data);
|
|
285
285
|
fs.appendFileSync(filePath, content, "utf-8");
|
|
286
286
|
}
|
|
287
|
+
function rmSync2(filePaths) {
|
|
288
|
+
filePaths.forEach(function(filePath) {
|
|
289
|
+
if (existsSync2(filePath)) {
|
|
290
|
+
fs.rmSync(filePath, {
|
|
291
|
+
recursive: true,
|
|
292
|
+
force: true
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
}
|
|
287
297
|
// src/utils/path.ts
|
|
288
298
|
import * as path from "node:path";
|
|
289
299
|
function resolveCyberSkillPath() {
|
|
@@ -1961,23 +1971,21 @@ function _reset() {
|
|
|
1961
1971
|
return _ts_generator(this, function(_state) {
|
|
1962
1972
|
switch(_state.label){
|
|
1963
1973
|
case 0:
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
];
|
|
1968
|
-
case 1:
|
|
1969
|
-
_state.sent();
|
|
1974
|
+
rmSync2([
|
|
1975
|
+
PATH.NODE_MODULES,
|
|
1976
|
+
PATH.PNPM_LOCK_YAML
|
|
1977
|
+
]);
|
|
1970
1978
|
return [
|
|
1971
1979
|
4,
|
|
1972
1980
|
installDependencies()
|
|
1973
1981
|
];
|
|
1974
|
-
case
|
|
1982
|
+
case 1:
|
|
1975
1983
|
_state.sent();
|
|
1976
1984
|
return [
|
|
1977
1985
|
4,
|
|
1978
1986
|
setupGitHook()
|
|
1979
1987
|
];
|
|
1980
|
-
case
|
|
1988
|
+
case 2:
|
|
1981
1989
|
_state.sent();
|
|
1982
1990
|
return [
|
|
1983
1991
|
2
|
|
@@ -122,7 +122,7 @@ __export(unit_exports, {
|
|
|
122
122
|
}
|
|
123
123
|
});
|
|
124
124
|
module.exports = __toCommonJS(unit_exports);
|
|
125
|
-
// node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.2_@types+node@22.13.
|
|
125
|
+
// node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.2_@types+node@22.13.17__@swc+core@1.11.16_@swc_95e38cac10676cdf66b55e0093c30cae/node_modules/tsup/assets/cjs_shims.js
|
|
126
126
|
var getImportMetaUrl = function() {
|
|
127
127
|
return typeof document === "undefined" ? new URL("file:".concat(__filename)).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
128
128
|
};
|
package/dist/constants/index.cjs
CHANGED
|
@@ -218,7 +218,7 @@ __export(constants_exports, {
|
|
|
218
218
|
}
|
|
219
219
|
});
|
|
220
220
|
module.exports = __toCommonJS(constants_exports);
|
|
221
|
-
// node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.2_@types+node@22.13.
|
|
221
|
+
// node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.2_@types+node@22.13.17__@swc+core@1.11.16_@swc_95e38cac10676cdf66b55e0093c30cae/node_modules/tsup/assets/cjs_shims.js
|
|
222
222
|
var getImportMetaUrl = function() {
|
|
223
223
|
return typeof document === "undefined" ? new URL("file:".concat(__filename)).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
224
224
|
};
|
package/dist/constants/path.cjs
CHANGED
|
@@ -215,7 +215,7 @@ __export(path_exports, {
|
|
|
215
215
|
}
|
|
216
216
|
});
|
|
217
217
|
module.exports = __toCommonJS(path_exports);
|
|
218
|
-
// node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.2_@types+node@22.13.
|
|
218
|
+
// node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.2_@types+node@22.13.17__@swc+core@1.11.16_@swc_95e38cac10676cdf66b55e0093c30cae/node_modules/tsup/assets/cjs_shims.js
|
|
219
219
|
var getImportMetaUrl = function() {
|
|
220
220
|
return typeof document === "undefined" ? new URL("file:".concat(__filename)).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
221
221
|
};
|
package/dist/index.cjs
CHANGED
|
@@ -626,6 +626,9 @@ __export(index_exports, {
|
|
|
626
626
|
resolveWorkingPath: function() {
|
|
627
627
|
return resolveWorkingPath;
|
|
628
628
|
},
|
|
629
|
+
rmSync: function() {
|
|
630
|
+
return rmSync2;
|
|
631
|
+
},
|
|
629
632
|
saveErrorListToStorage: function() {
|
|
630
633
|
return saveErrorListToStorage;
|
|
631
634
|
},
|
|
@@ -664,7 +667,7 @@ __export(index_exports, {
|
|
|
664
667
|
}
|
|
665
668
|
});
|
|
666
669
|
module.exports = __toCommonJS(index_exports);
|
|
667
|
-
// node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.2_@types+node@22.13.
|
|
670
|
+
// node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.2_@types+node@22.13.17__@swc+core@1.11.16_@swc_95e38cac10676cdf66b55e0093c30cae/node_modules/tsup/assets/cjs_shims.js
|
|
668
671
|
var getImportMetaUrl = function() {
|
|
669
672
|
return typeof document === "undefined" ? new URL("file:".concat(__filename)).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
670
673
|
};
|
|
@@ -751,6 +754,16 @@ function appendFileSync2(filePath, data) {
|
|
|
751
754
|
var content = isJson2 && (typeof data === "undefined" ? "undefined" : _type_of(data)) === "object" ? JSON.stringify(data, null, 4) : String(data);
|
|
752
755
|
fs.appendFileSync(filePath, content, "utf-8");
|
|
753
756
|
}
|
|
757
|
+
function rmSync2(filePaths) {
|
|
758
|
+
filePaths.forEach(function(filePath) {
|
|
759
|
+
if (existsSync2(filePath)) {
|
|
760
|
+
fs.rmSync(filePath, {
|
|
761
|
+
recursive: true,
|
|
762
|
+
force: true
|
|
763
|
+
});
|
|
764
|
+
}
|
|
765
|
+
});
|
|
766
|
+
}
|
|
754
767
|
// src/utils/path.ts
|
|
755
768
|
var import_node_module = require("module");
|
|
756
769
|
var path = __toESM(require("path"), 1);
|
|
@@ -4531,6 +4544,7 @@ function removeAccent(str) {
|
|
|
4531
4544
|
resolveCommands: resolveCommands,
|
|
4532
4545
|
resolveCyberSkillPath: resolveCyberSkillPath,
|
|
4533
4546
|
resolveWorkingPath: resolveWorkingPath,
|
|
4547
|
+
rmSync: rmSync,
|
|
4534
4548
|
saveErrorListToStorage: saveErrorListToStorage,
|
|
4535
4549
|
serializer: serializer,
|
|
4536
4550
|
storageClient: storageClient,
|
package/dist/index.d.cts
CHANGED
|
@@ -141,6 +141,7 @@ export { commandFormatter } from './_tsup-dts-rollup.cjs';
|
|
|
141
141
|
export { readFileSync } from './_tsup-dts-rollup.cjs';
|
|
142
142
|
export { writeFileSync } from './_tsup-dts-rollup.cjs';
|
|
143
143
|
export { appendFileSync } from './_tsup-dts-rollup.cjs';
|
|
144
|
+
export { rmSync } from './_tsup-dts-rollup.cjs';
|
|
144
145
|
export { existsSync } from './_tsup-dts-rollup.cjs';
|
|
145
146
|
export { throwResponse } from './_tsup-dts-rollup.cjs';
|
|
146
147
|
export { getPackageJson } from './_tsup-dts-rollup.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -141,6 +141,7 @@ export { commandFormatter } from './_tsup-dts-rollup.js';
|
|
|
141
141
|
export { readFileSync } from './_tsup-dts-rollup.js';
|
|
142
142
|
export { writeFileSync } from './_tsup-dts-rollup.js';
|
|
143
143
|
export { appendFileSync } from './_tsup-dts-rollup.js';
|
|
144
|
+
export { rmSync } from './_tsup-dts-rollup.js';
|
|
144
145
|
export { existsSync } from './_tsup-dts-rollup.js';
|
|
145
146
|
export { throwResponse } from './_tsup-dts-rollup.js';
|
|
146
147
|
export { getPackageJson } from './_tsup-dts-rollup.js';
|
package/dist/index.js
CHANGED
|
@@ -421,6 +421,16 @@ function appendFileSync2(filePath, data) {
|
|
|
421
421
|
var content = isJson2 && (typeof data === "undefined" ? "undefined" : _type_of(data)) === "object" ? JSON.stringify(data, null, 4) : String(data);
|
|
422
422
|
fs.appendFileSync(filePath, content, "utf-8");
|
|
423
423
|
}
|
|
424
|
+
function rmSync2(filePaths) {
|
|
425
|
+
filePaths.forEach(function(filePath) {
|
|
426
|
+
if (existsSync2(filePath)) {
|
|
427
|
+
fs.rmSync(filePath, {
|
|
428
|
+
recursive: true,
|
|
429
|
+
force: true
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
});
|
|
433
|
+
}
|
|
424
434
|
// src/utils/path.ts
|
|
425
435
|
import { createRequire } from "node:module";
|
|
426
436
|
import * as path from "node:path";
|
|
@@ -4130,4 +4140,4 @@ function regexSearchMapper(str) {
|
|
|
4130
4140
|
function removeAccent(str) {
|
|
4131
4141
|
return str.normalize("NFD").replace(RegExp("\\p{Diacritic}", "gu"), "");
|
|
4132
4142
|
}
|
|
4133
|
-
export { ApolloProvider, BUILD_DIRECTORY, COMMAND, COMMIT_LINT_CLI, CYBERSKILL_CLI, CYBERSKILL_DIRECTORY, CYBERSKILL_PACKAGE_NAME, CYBERSKILL_STORAGE, C_Collection, C_Db, C_Document, C_Model, ESLINT_CLI, ESLINT_INSPECT_CLI, E_ErrorType, GIT_CLI, GIT_COMMIT_EDITMSG, GIT_HOOK, GIT_IGNORE, HOOK, LINT_STAGED_CLI, Loading, LoadingContext, LoadingProvider, MongoController, MongooseController, NODE_MODULES, NODE_MODULES_INSPECT_CLI, NextIntlContext, NextIntlProvider, PACKAGE_JSON, PACKAGE_LOCK_JSON, PATH, PNPM_CLI, PNPM_DLX_CLI, PNPM_EXEC_CLI, PNPM_LOCK_YAML, RESPONSE_STATUS, RIMRAF_CLI, SIMPLE_GIT_HOOK_CLI, SIMPLE_GIT_HOOK_JSON, TSCONFIG_JSON, TSC_CLI, TSX_CLI, VITEST_CLI, WORKING_DIRECTORY, aggregatePaginate, appendFileSync2 as appendFileSync, checkPackage, clearAllErrorLists, commandFormatter, commandLog, deepMerge, dirname2 as dirname, executeCommand, existsSync2 as existsSync, generateShortId, generateSlug, getLatestPackageVersion, getPackageJson, getStorageDir, getStoredErrorLists, initNodePersist, isJson, join2 as join, mongo, mongoosePaginate, readFileSync2 as readFileSync, regexSearchMapper, removeAccent, require2 as require, resolve2 as resolve, resolveCommands, resolveCyberSkillPath, resolveWorkingPath, saveErrorListToStorage, serializer, storageClient, storageServer, throwResponse, useLoading, useNextIntl, useStorage, useTranslateNextIntl, validate, withNextIntl, writeFileSync2 as writeFileSync };
|
|
4143
|
+
export { ApolloProvider, BUILD_DIRECTORY, COMMAND, COMMIT_LINT_CLI, CYBERSKILL_CLI, CYBERSKILL_DIRECTORY, CYBERSKILL_PACKAGE_NAME, CYBERSKILL_STORAGE, C_Collection, C_Db, C_Document, C_Model, ESLINT_CLI, ESLINT_INSPECT_CLI, E_ErrorType, GIT_CLI, GIT_COMMIT_EDITMSG, GIT_HOOK, GIT_IGNORE, HOOK, LINT_STAGED_CLI, Loading, LoadingContext, LoadingProvider, MongoController, MongooseController, NODE_MODULES, NODE_MODULES_INSPECT_CLI, NextIntlContext, NextIntlProvider, PACKAGE_JSON, PACKAGE_LOCK_JSON, PATH, PNPM_CLI, PNPM_DLX_CLI, PNPM_EXEC_CLI, PNPM_LOCK_YAML, RESPONSE_STATUS, RIMRAF_CLI, SIMPLE_GIT_HOOK_CLI, SIMPLE_GIT_HOOK_JSON, TSCONFIG_JSON, TSC_CLI, TSX_CLI, VITEST_CLI, WORKING_DIRECTORY, aggregatePaginate, appendFileSync2 as appendFileSync, checkPackage, clearAllErrorLists, commandFormatter, commandLog, deepMerge, dirname2 as dirname, executeCommand, existsSync2 as existsSync, generateShortId, generateSlug, getLatestPackageVersion, getPackageJson, getStorageDir, getStoredErrorLists, initNodePersist, isJson, join2 as join, mongo, mongoosePaginate, readFileSync2 as readFileSync, regexSearchMapper, removeAccent, require2 as require, resolve2 as resolve, resolveCommands, resolveCyberSkillPath, resolveWorkingPath, rmSync2 as rmSync, saveErrorListToStorage, serializer, storageClient, storageServer, throwResponse, useLoading, useNextIntl, useStorage, useTranslateNextIntl, validate, withNextIntl, writeFileSync2 as writeFileSync };
|
package/dist/utils/command.cjs
CHANGED
|
@@ -269,7 +269,7 @@ __export(command_exports, {
|
|
|
269
269
|
}
|
|
270
270
|
});
|
|
271
271
|
module.exports = __toCommonJS(command_exports);
|
|
272
|
-
// node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.2_@types+node@22.13.
|
|
272
|
+
// node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.2_@types+node@22.13.17__@swc+core@1.11.16_@swc_95e38cac10676cdf66b55e0093c30cae/node_modules/tsup/assets/cjs_shims.js
|
|
273
273
|
var getImportMetaUrl = function() {
|
|
274
274
|
return typeof document === "undefined" ? new URL("file:".concat(__filename)).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
275
275
|
};
|
package/dist/utils/fs.cjs
CHANGED
|
@@ -73,6 +73,9 @@ __export(fs_exports, {
|
|
|
73
73
|
readFileSync: function() {
|
|
74
74
|
return readFileSync2;
|
|
75
75
|
},
|
|
76
|
+
rmSync: function() {
|
|
77
|
+
return rmSync2;
|
|
78
|
+
},
|
|
76
79
|
writeFileSync: function() {
|
|
77
80
|
return writeFileSync2;
|
|
78
81
|
}
|
|
@@ -109,10 +112,21 @@ function appendFileSync2(filePath, data) {
|
|
|
109
112
|
var content = isJson && (typeof data === "undefined" ? "undefined" : _type_of(data)) === "object" ? JSON.stringify(data, null, 4) : String(data);
|
|
110
113
|
fs.appendFileSync(filePath, content, "utf-8");
|
|
111
114
|
}
|
|
115
|
+
function rmSync2(filePaths) {
|
|
116
|
+
filePaths.forEach(function(filePath) {
|
|
117
|
+
if (existsSync2(filePath)) {
|
|
118
|
+
fs.rmSync(filePath, {
|
|
119
|
+
recursive: true,
|
|
120
|
+
force: true
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
}
|
|
112
125
|
// Annotate the CommonJS export names for ESM import in node:
|
|
113
126
|
0 && (module.exports = {
|
|
114
127
|
appendFileSync: appendFileSync,
|
|
115
128
|
existsSync: existsSync,
|
|
116
129
|
readFileSync: readFileSync,
|
|
130
|
+
rmSync: rmSync,
|
|
117
131
|
writeFileSync: writeFileSync
|
|
118
132
|
});
|
package/dist/utils/fs.d.cts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { readFileSync_alias_1 as readFileSync } from '../_tsup-dts-rollup.cjs';
|
|
2
2
|
export { writeFileSync_alias_1 as writeFileSync } from '../_tsup-dts-rollup.cjs';
|
|
3
3
|
export { appendFileSync_alias_1 as appendFileSync } from '../_tsup-dts-rollup.cjs';
|
|
4
|
+
export { rmSync_alias_1 as rmSync } from '../_tsup-dts-rollup.cjs';
|
|
4
5
|
export { existsSync_alias_1 as existsSync } from '../_tsup-dts-rollup.cjs';
|
package/dist/utils/fs.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { readFileSync_alias_1 as readFileSync } from '../_tsup-dts-rollup.js';
|
|
2
2
|
export { writeFileSync_alias_1 as writeFileSync } from '../_tsup-dts-rollup.js';
|
|
3
3
|
export { appendFileSync_alias_1 as appendFileSync } from '../_tsup-dts-rollup.js';
|
|
4
|
+
export { rmSync_alias_1 as rmSync } from '../_tsup-dts-rollup.js';
|
|
4
5
|
export { existsSync_alias_1 as existsSync } from '../_tsup-dts-rollup.js';
|
package/dist/utils/fs.js
CHANGED
|
@@ -34,4 +34,14 @@ function appendFileSync2(filePath, data) {
|
|
|
34
34
|
var content = isJson && (typeof data === "undefined" ? "undefined" : _type_of(data)) === "object" ? JSON.stringify(data, null, 4) : String(data);
|
|
35
35
|
fs.appendFileSync(filePath, content, "utf-8");
|
|
36
36
|
}
|
|
37
|
-
|
|
37
|
+
function rmSync2(filePaths) {
|
|
38
|
+
filePaths.forEach(function(filePath) {
|
|
39
|
+
if (existsSync2(filePath)) {
|
|
40
|
+
fs.rmSync(filePath, {
|
|
41
|
+
recursive: true,
|
|
42
|
+
force: true
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
export { appendFileSync2 as appendFileSync, existsSync2 as existsSync, readFileSync2 as readFileSync, rmSync2 as rmSync, writeFileSync2 as writeFileSync };
|
|
@@ -306,6 +306,9 @@ __export(index_nodejs_exports, {
|
|
|
306
306
|
resolveWorkingPath: function() {
|
|
307
307
|
return resolveWorkingPath;
|
|
308
308
|
},
|
|
309
|
+
rmSync: function() {
|
|
310
|
+
return rmSync2;
|
|
311
|
+
},
|
|
309
312
|
saveErrorListToStorage: function() {
|
|
310
313
|
return saveErrorListToStorage;
|
|
311
314
|
},
|
|
@@ -320,7 +323,7 @@ __export(index_nodejs_exports, {
|
|
|
320
323
|
}
|
|
321
324
|
});
|
|
322
325
|
module.exports = __toCommonJS(index_nodejs_exports);
|
|
323
|
-
// node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.2_@types+node@22.13.
|
|
326
|
+
// node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.2_@types+node@22.13.17__@swc+core@1.11.16_@swc_95e38cac10676cdf66b55e0093c30cae/node_modules/tsup/assets/cjs_shims.js
|
|
324
327
|
var getImportMetaUrl = function() {
|
|
325
328
|
return typeof document === "undefined" ? new URL("file:".concat(__filename)).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
326
329
|
};
|
|
@@ -481,6 +484,16 @@ function appendFileSync2(filePath, data) {
|
|
|
481
484
|
var content = isJson && (typeof data === "undefined" ? "undefined" : _type_of(data)) === "object" ? JSON.stringify(data, null, 4) : String(data);
|
|
482
485
|
fs.appendFileSync(filePath, content, "utf-8");
|
|
483
486
|
}
|
|
487
|
+
function rmSync2(filePaths) {
|
|
488
|
+
filePaths.forEach(function(filePath) {
|
|
489
|
+
if (existsSync2(filePath)) {
|
|
490
|
+
fs.rmSync(filePath, {
|
|
491
|
+
recursive: true,
|
|
492
|
+
force: true
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
});
|
|
496
|
+
}
|
|
484
497
|
// src/utils/storage-server.ts
|
|
485
498
|
var import_node_persist = __toESM(require("node-persist"), 1);
|
|
486
499
|
var import_node_os = __toESM(require("os"), 1);
|
|
@@ -1731,6 +1744,7 @@ function throwResponse(param) {
|
|
|
1731
1744
|
resolveCommands: resolveCommands,
|
|
1732
1745
|
resolveCyberSkillPath: resolveCyberSkillPath,
|
|
1733
1746
|
resolveWorkingPath: resolveWorkingPath,
|
|
1747
|
+
rmSync: rmSync,
|
|
1734
1748
|
saveErrorListToStorage: saveErrorListToStorage,
|
|
1735
1749
|
storageServer: storageServer,
|
|
1736
1750
|
throwResponse: throwResponse,
|
|
@@ -8,6 +8,7 @@ export { commandFormatter_alias_2 as commandFormatter } from '../_tsup-dts-rollu
|
|
|
8
8
|
export { readFileSync_alias_2 as readFileSync } from '../_tsup-dts-rollup.cjs';
|
|
9
9
|
export { writeFileSync_alias_2 as writeFileSync } from '../_tsup-dts-rollup.cjs';
|
|
10
10
|
export { appendFileSync_alias_2 as appendFileSync } from '../_tsup-dts-rollup.cjs';
|
|
11
|
+
export { rmSync_alias_2 as rmSync } from '../_tsup-dts-rollup.cjs';
|
|
11
12
|
export { existsSync_alias_2 as existsSync } from '../_tsup-dts-rollup.cjs';
|
|
12
13
|
export { throwResponse_alias_1 as throwResponse } from '../_tsup-dts-rollup.cjs';
|
|
13
14
|
export { getPackageJson_alias_1 as getPackageJson } from '../_tsup-dts-rollup.cjs';
|
|
@@ -8,6 +8,7 @@ export { commandFormatter_alias_2 as commandFormatter } from '../_tsup-dts-rollu
|
|
|
8
8
|
export { readFileSync_alias_2 as readFileSync } from '../_tsup-dts-rollup.js';
|
|
9
9
|
export { writeFileSync_alias_2 as writeFileSync } from '../_tsup-dts-rollup.js';
|
|
10
10
|
export { appendFileSync_alias_2 as appendFileSync } from '../_tsup-dts-rollup.js';
|
|
11
|
+
export { rmSync_alias_2 as rmSync } from '../_tsup-dts-rollup.js';
|
|
11
12
|
export { existsSync_alias_2 as existsSync } from '../_tsup-dts-rollup.js';
|
|
12
13
|
export { throwResponse_alias_1 as throwResponse } from '../_tsup-dts-rollup.js';
|
|
13
14
|
export { getPackageJson_alias_1 as getPackageJson } from '../_tsup-dts-rollup.js';
|
|
@@ -340,6 +340,16 @@ function appendFileSync2(filePath, data) {
|
|
|
340
340
|
var content = isJson && (typeof data === "undefined" ? "undefined" : _type_of(data)) === "object" ? JSON.stringify(data, null, 4) : String(data);
|
|
341
341
|
fs.appendFileSync(filePath, content, "utf-8");
|
|
342
342
|
}
|
|
343
|
+
function rmSync2(filePaths) {
|
|
344
|
+
filePaths.forEach(function(filePath) {
|
|
345
|
+
if (existsSync2(filePath)) {
|
|
346
|
+
fs.rmSync(filePath, {
|
|
347
|
+
recursive: true,
|
|
348
|
+
force: true
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
});
|
|
352
|
+
}
|
|
343
353
|
// src/utils/storage-server.ts
|
|
344
354
|
import nodePersist from "node-persist";
|
|
345
355
|
import os from "node:os";
|
|
@@ -1568,4 +1578,4 @@ function throwResponse(param) {
|
|
|
1568
1578
|
throw new Error(responseMessage);
|
|
1569
1579
|
}
|
|
1570
1580
|
}
|
|
1571
|
-
export { appendFileSync2 as appendFileSync, checkPackage, clearAllErrorLists, commandFormatter, commandLog, dirname2 as dirname, executeCommand, existsSync2 as existsSync, getLatestPackageVersion, getPackageJson, getStorageDir, getStoredErrorLists, initNodePersist, join2 as join, readFileSync2 as readFileSync, require2 as require, resolve2 as resolve, resolveCommands, resolveCyberSkillPath, resolveWorkingPath, saveErrorListToStorage, storageServer, throwResponse, writeFileSync2 as writeFileSync };
|
|
1581
|
+
export { appendFileSync2 as appendFileSync, checkPackage, clearAllErrorLists, commandFormatter, commandLog, dirname2 as dirname, executeCommand, existsSync2 as existsSync, getLatestPackageVersion, getPackageJson, getStorageDir, getStoredErrorLists, initNodePersist, join2 as join, readFileSync2 as readFileSync, require2 as require, resolve2 as resolve, resolveCommands, resolveCyberSkillPath, resolveWorkingPath, rmSync2 as rmSync, saveErrorListToStorage, storageServer, throwResponse, writeFileSync2 as writeFileSync };
|
package/dist/utils/package.cjs
CHANGED
|
@@ -224,7 +224,7 @@ __export(package_exports, {
|
|
|
224
224
|
}
|
|
225
225
|
});
|
|
226
226
|
module.exports = __toCommonJS(package_exports);
|
|
227
|
-
// node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.2_@types+node@22.13.
|
|
227
|
+
// node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.2_@types+node@22.13.17__@swc+core@1.11.16_@swc_95e38cac10676cdf66b55e0093c30cae/node_modules/tsup/assets/cjs_shims.js
|
|
228
228
|
var getImportMetaUrl = function() {
|
|
229
229
|
return typeof document === "undefined" ? new URL("file:".concat(__filename)).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
230
230
|
};
|
package/dist/utils/path.cjs
CHANGED
|
@@ -109,7 +109,7 @@ __export(path_exports, {
|
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
111
|
module.exports = __toCommonJS(path_exports);
|
|
112
|
-
// node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.2_@types+node@22.13.
|
|
112
|
+
// node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.2_@types+node@22.13.17__@swc+core@1.11.16_@swc_95e38cac10676cdf66b55e0093c30cae/node_modules/tsup/assets/cjs_shims.js
|
|
113
113
|
var getImportMetaUrl = function() {
|
|
114
114
|
return typeof document === "undefined" ? new URL("file:".concat(__filename)).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
115
115
|
};
|
|
@@ -224,7 +224,7 @@ __export(storage_server_exports, {
|
|
|
224
224
|
}
|
|
225
225
|
});
|
|
226
226
|
module.exports = __toCommonJS(storage_server_exports);
|
|
227
|
-
// node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.2_@types+node@22.13.
|
|
227
|
+
// node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.2_@types+node@22.13.17__@swc+core@1.11.16_@swc_95e38cac10676cdf66b55e0093c30cae/node_modules/tsup/assets/cjs_shims.js
|
|
228
228
|
var getImportMetaUrl = function() {
|
|
229
229
|
return typeof document === "undefined" ? new URL("file:".concat(__filename)).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
230
230
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyberskill/shared",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.49.0",
|
|
5
5
|
"description": "CyberSkill Shared",
|
|
6
6
|
"author": "Stephen Cheng",
|
|
7
7
|
"license": "MIT",
|
|
@@ -216,7 +216,6 @@
|
|
|
216
216
|
"react": "19.1.0",
|
|
217
217
|
"react-dom": "19.1.0",
|
|
218
218
|
"react-i18next": "15.4.1",
|
|
219
|
-
"rimraf": "6.0.1",
|
|
220
219
|
"sass": "1.86.1",
|
|
221
220
|
"simple-git-hooks": "2.12.1",
|
|
222
221
|
"slugify": "1.6.6",
|