tsds-validate 1.7.2 → 1.7.4
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/cjs/command.js +6 -5
- package/dist/cjs/command.js.map +1 -1
- package/dist/esm/command.js +6 -5
- package/dist/esm/command.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/command.js
CHANGED
|
@@ -91,7 +91,11 @@ function run(args, options, callback) {
|
|
|
91
91
|
queue.defer(_crossspawncb.default.bind(null, depcheck, [], spawnOptions));
|
|
92
92
|
queue.defer(_tsdstypedoc.default.bind(null, args, options));
|
|
93
93
|
queue.await(function(err) {
|
|
94
|
-
|
|
94
|
+
if (err) {
|
|
95
|
+
var errorMessage = err.stderr || err.message || err.toString() || 'Validation failed';
|
|
96
|
+
return callback(new Error(errorMessage));
|
|
97
|
+
}
|
|
98
|
+
callback();
|
|
95
99
|
});
|
|
96
100
|
} catch (err) {
|
|
97
101
|
return callback(err);
|
|
@@ -101,9 +105,6 @@ var worker = major >= 20 ? run : (0, _nodeversioncall.bind)('>=20', _path.defaul
|
|
|
101
105
|
callbacks: true
|
|
102
106
|
});
|
|
103
107
|
function publish(args, options, callback) {
|
|
104
|
-
worker(args, options,
|
|
105
|
-
if (err && err.message) console.log(err.message);
|
|
106
|
-
callback(err);
|
|
107
|
-
});
|
|
108
|
+
worker(args, options, callback);
|
|
108
109
|
}
|
|
109
110
|
/* CJS INTEROP */ if (exports.__esModule && exports.default) { try { Object.defineProperty(exports.default, '__esModule', { value: true }); for (var key in exports) { exports.default[key] = exports[key]; } } catch (_) {}; module.exports = exports.default; }
|
package/dist/cjs/command.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/ts-dev-stack/tsds-validate/src/command.ts"],"sourcesContent":["import spawn, { type SpawnError } from 'cross-spawn-cb';\nimport { bind } from 'node-version-call';\nimport path from 'path';\nimport Queue from 'queue-cb';\nimport resolveBin from 'resolve-bin-sync';\nimport format from 'tsds-biome';\nimport build from 'tsds-build';\nimport type { CommandCallback, CommandOptions } from 'tsds-lib';\nimport docs from 'tsds-typedoc';\nimport url from 'url';\n\nconst major = +process.versions.node.split('.')[0];\nconst __dirname = path.dirname(typeof __filename === 'undefined' ? url.fileURLToPath(import.meta.url) : __filename);\nconst dist = path.join(__dirname, '..');\n\nfunction run(args: string[], options: CommandOptions, callback: CommandCallback) {\n try {\n const depcheck = resolveBin('depcheck');\n const sortPackageJSON = resolveBin('sort-package-json');\n const spawnOptions = { ...options, encoding: 'utf8' };\n\n const queue = new Queue(1);\n queue.defer(format.bind(null, args, options));\n queue.defer(build.bind(null, args, options));\n queue.defer(spawn.bind(null, sortPackageJSON, [], spawnOptions));\n queue.defer(spawn.bind(null, depcheck, [], spawnOptions));\n queue.defer(docs.bind(null, args, options));\n queue.await((err: SpawnError) => {\n err
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/ts-dev-stack/tsds-validate/src/command.ts"],"sourcesContent":["import spawn, { type SpawnError } from 'cross-spawn-cb';\nimport { bind } from 'node-version-call';\nimport path from 'path';\nimport Queue from 'queue-cb';\nimport resolveBin from 'resolve-bin-sync';\nimport format from 'tsds-biome';\nimport build from 'tsds-build';\nimport type { CommandCallback, CommandOptions } from 'tsds-lib';\nimport docs from 'tsds-typedoc';\nimport url from 'url';\n\nconst major = +process.versions.node.split('.')[0];\nconst __dirname = path.dirname(typeof __filename === 'undefined' ? url.fileURLToPath(import.meta.url) : __filename);\nconst dist = path.join(__dirname, '..');\n\nfunction run(args: string[], options: CommandOptions, callback: CommandCallback) {\n try {\n const depcheck = resolveBin('depcheck');\n const sortPackageJSON = resolveBin('sort-package-json');\n const spawnOptions = { ...options, encoding: 'utf8' };\n\n const queue = new Queue(1);\n queue.defer(format.bind(null, args, options));\n queue.defer(build.bind(null, args, options));\n queue.defer(spawn.bind(null, sortPackageJSON, [], spawnOptions));\n queue.defer(spawn.bind(null, depcheck, [], spawnOptions));\n queue.defer(docs.bind(null, args, options));\n queue.await((err: SpawnError) => {\n if (err) {\n const errorMessage = (err.stderr as string) || err.message || err.toString() || 'Validation failed';\n return callback(new Error(errorMessage));\n }\n callback();\n });\n } catch (err) {\n return callback(err);\n }\n}\n\ntype commandFunction = (args: string[], options: CommandOptions, callback: CommandCallback) => void;\n\nconst worker = (major >= 20 ? run : bind('>=20', path.join(dist, 'cjs', 'command.js'), { callbacks: true })) as commandFunction;\n\nexport default function publish(args: string[], options: CommandOptions, callback: CommandCallback) {\n worker(args, options, callback);\n}\n"],"names":["publish","major","process","versions","node","split","__dirname","path","dirname","__filename","url","fileURLToPath","dist","join","run","args","options","callback","depcheck","resolveBin","sortPackageJSON","spawnOptions","encoding","queue","Queue","defer","format","bind","build","spawn","docs","await","err","errorMessage","stderr","message","toString","Error","worker","callbacks"],"mappings":";;;;+BA2CA;;;eAAwBA;;;mEA3Ce;+BAClB;2DACJ;8DACC;qEACK;gEACJ;gEACD;kEAED;0DACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEhB,IAAMC,QAAQ,CAACC,QAAQC,QAAQ,CAACC,IAAI,CAACC,KAAK,CAAC,IAAI,CAAC,EAAE;AAClD,IAAMC,YAAYC,aAAI,CAACC,OAAO,CAAC,OAAOC,eAAe,cAAcC,YAAG,CAACC,aAAa,CAAC,uDAAmBF;AACxG,IAAMG,OAAOL,aAAI,CAACM,IAAI,CAACP,WAAW;AAElC,SAASQ,IAAIC,IAAc,EAAEC,OAAuB,EAAEC,QAAyB;IAC7E,IAAI;QACF,IAAMC,WAAWC,IAAAA,uBAAU,EAAC;QAC5B,IAAMC,kBAAkBD,IAAAA,uBAAU,EAAC;QACnC,IAAME,eAAe,wCAAKL;YAASM,UAAU;;QAE7C,IAAMC,QAAQ,IAAIC,gBAAK,CAAC;QACxBD,MAAME,KAAK,CAACC,kBAAM,CAACC,IAAI,CAAC,MAAMZ,MAAMC;QACpCO,MAAME,KAAK,CAACG,kBAAK,CAACD,IAAI,CAAC,MAAMZ,MAAMC;QACnCO,MAAME,KAAK,CAACI,qBAAK,CAACF,IAAI,CAAC,MAAMP,iBAAiB,EAAE,EAAEC;QAClDE,MAAME,KAAK,CAACI,qBAAK,CAACF,IAAI,CAAC,MAAMT,UAAU,EAAE,EAAEG;QAC3CE,MAAME,KAAK,CAACK,oBAAI,CAACH,IAAI,CAAC,MAAMZ,MAAMC;QAClCO,MAAMQ,KAAK,CAAC,SAACC;YACX,IAAIA,KAAK;gBACP,IAAMC,eAAe,AAACD,IAAIE,MAAM,IAAeF,IAAIG,OAAO,IAAIH,IAAII,QAAQ,MAAM;gBAChF,OAAOnB,SAAS,IAAIoB,MAAMJ;YAC5B;YACAhB;QACF;IACF,EAAE,OAAOe,KAAK;QACZ,OAAOf,SAASe;IAClB;AACF;AAIA,IAAMM,SAAUrC,SAAS,KAAKa,MAAMa,IAAAA,qBAAI,EAAC,QAAQpB,aAAI,CAACM,IAAI,CAACD,MAAM,OAAO,eAAe;IAAE2B,WAAW;AAAK;AAE1F,SAASvC,QAAQe,IAAc,EAAEC,OAAuB,EAAEC,QAAyB;IAChGqB,OAAOvB,MAAMC,SAASC;AACxB"}
|
package/dist/esm/command.js
CHANGED
|
@@ -25,7 +25,11 @@ function run(args, options, callback) {
|
|
|
25
25
|
queue.defer(spawn.bind(null, depcheck, [], spawnOptions));
|
|
26
26
|
queue.defer(docs.bind(null, args, options));
|
|
27
27
|
queue.await((err)=>{
|
|
28
|
-
|
|
28
|
+
if (err) {
|
|
29
|
+
const errorMessage = err.stderr || err.message || err.toString() || 'Validation failed';
|
|
30
|
+
return callback(new Error(errorMessage));
|
|
31
|
+
}
|
|
32
|
+
callback();
|
|
29
33
|
});
|
|
30
34
|
} catch (err) {
|
|
31
35
|
return callback(err);
|
|
@@ -35,8 +39,5 @@ const worker = major >= 20 ? run : bind('>=20', path.join(dist, 'cjs', 'command.
|
|
|
35
39
|
callbacks: true
|
|
36
40
|
});
|
|
37
41
|
export default function publish(args, options, callback) {
|
|
38
|
-
worker(args, options,
|
|
39
|
-
if (err && err.message) console.log(err.message);
|
|
40
|
-
callback(err);
|
|
41
|
-
});
|
|
42
|
+
worker(args, options, callback);
|
|
42
43
|
}
|
package/dist/esm/command.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/ts-dev-stack/tsds-validate/src/command.ts"],"sourcesContent":["import spawn, { type SpawnError } from 'cross-spawn-cb';\nimport { bind } from 'node-version-call';\nimport path from 'path';\nimport Queue from 'queue-cb';\nimport resolveBin from 'resolve-bin-sync';\nimport format from 'tsds-biome';\nimport build from 'tsds-build';\nimport type { CommandCallback, CommandOptions } from 'tsds-lib';\nimport docs from 'tsds-typedoc';\nimport url from 'url';\n\nconst major = +process.versions.node.split('.')[0];\nconst __dirname = path.dirname(typeof __filename === 'undefined' ? url.fileURLToPath(import.meta.url) : __filename);\nconst dist = path.join(__dirname, '..');\n\nfunction run(args: string[], options: CommandOptions, callback: CommandCallback) {\n try {\n const depcheck = resolveBin('depcheck');\n const sortPackageJSON = resolveBin('sort-package-json');\n const spawnOptions = { ...options, encoding: 'utf8' };\n\n const queue = new Queue(1);\n queue.defer(format.bind(null, args, options));\n queue.defer(build.bind(null, args, options));\n queue.defer(spawn.bind(null, sortPackageJSON, [], spawnOptions));\n queue.defer(spawn.bind(null, depcheck, [], spawnOptions));\n queue.defer(docs.bind(null, args, options));\n queue.await((err: SpawnError) => {\n err
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/ts-dev-stack/tsds-validate/src/command.ts"],"sourcesContent":["import spawn, { type SpawnError } from 'cross-spawn-cb';\nimport { bind } from 'node-version-call';\nimport path from 'path';\nimport Queue from 'queue-cb';\nimport resolveBin from 'resolve-bin-sync';\nimport format from 'tsds-biome';\nimport build from 'tsds-build';\nimport type { CommandCallback, CommandOptions } from 'tsds-lib';\nimport docs from 'tsds-typedoc';\nimport url from 'url';\n\nconst major = +process.versions.node.split('.')[0];\nconst __dirname = path.dirname(typeof __filename === 'undefined' ? url.fileURLToPath(import.meta.url) : __filename);\nconst dist = path.join(__dirname, '..');\n\nfunction run(args: string[], options: CommandOptions, callback: CommandCallback) {\n try {\n const depcheck = resolveBin('depcheck');\n const sortPackageJSON = resolveBin('sort-package-json');\n const spawnOptions = { ...options, encoding: 'utf8' };\n\n const queue = new Queue(1);\n queue.defer(format.bind(null, args, options));\n queue.defer(build.bind(null, args, options));\n queue.defer(spawn.bind(null, sortPackageJSON, [], spawnOptions));\n queue.defer(spawn.bind(null, depcheck, [], spawnOptions));\n queue.defer(docs.bind(null, args, options));\n queue.await((err: SpawnError) => {\n if (err) {\n const errorMessage = (err.stderr as string) || err.message || err.toString() || 'Validation failed';\n return callback(new Error(errorMessage));\n }\n callback();\n });\n } catch (err) {\n return callback(err);\n }\n}\n\ntype commandFunction = (args: string[], options: CommandOptions, callback: CommandCallback) => void;\n\nconst worker = (major >= 20 ? run : bind('>=20', path.join(dist, 'cjs', 'command.js'), { callbacks: true })) as commandFunction;\n\nexport default function publish(args: string[], options: CommandOptions, callback: CommandCallback) {\n worker(args, options, callback);\n}\n"],"names":["spawn","bind","path","Queue","resolveBin","format","build","docs","url","major","process","versions","node","split","__dirname","dirname","__filename","fileURLToPath","dist","join","run","args","options","callback","depcheck","sortPackageJSON","spawnOptions","encoding","queue","defer","await","err","errorMessage","stderr","message","toString","Error","worker","callbacks","publish"],"mappings":"AAAA,OAAOA,WAAgC,iBAAiB;AACxD,SAASC,IAAI,QAAQ,oBAAoB;AACzC,OAAOC,UAAU,OAAO;AACxB,OAAOC,WAAW,WAAW;AAC7B,OAAOC,gBAAgB,mBAAmB;AAC1C,OAAOC,YAAY,aAAa;AAChC,OAAOC,WAAW,aAAa;AAE/B,OAAOC,UAAU,eAAe;AAChC,OAAOC,SAAS,MAAM;AAEtB,MAAMC,QAAQ,CAACC,QAAQC,QAAQ,CAACC,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