tsds-lib-test 1.1.0 → 1.1.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/dist/cjs/lib/data.js
CHANGED
|
@@ -16,11 +16,36 @@ var _osshim = require("os-shim");
|
|
|
16
16
|
var _queuecb = /*#__PURE__*/ _interop_require_default(require("queue-cb"));
|
|
17
17
|
var _shorthash = /*#__PURE__*/ _interop_require_default(require("short-hash"));
|
|
18
18
|
var _prepareGit = /*#__PURE__*/ _interop_require_default(require("./prepareGit.js"));
|
|
19
|
+
function _array_like_to_array(arr, len) {
|
|
20
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
21
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
22
|
+
return arr2;
|
|
23
|
+
}
|
|
24
|
+
function _array_without_holes(arr) {
|
|
25
|
+
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
26
|
+
}
|
|
19
27
|
function _interop_require_default(obj) {
|
|
20
28
|
return obj && obj.__esModule ? obj : {
|
|
21
29
|
default: obj
|
|
22
30
|
};
|
|
23
31
|
}
|
|
32
|
+
function _iterable_to_array(iter) {
|
|
33
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
34
|
+
}
|
|
35
|
+
function _non_iterable_spread() {
|
|
36
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
37
|
+
}
|
|
38
|
+
function _to_consumable_array(arr) {
|
|
39
|
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
40
|
+
}
|
|
41
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
42
|
+
if (!o) return;
|
|
43
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
44
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
45
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
46
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
47
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
48
|
+
}
|
|
24
49
|
function data(git, options, callback) {
|
|
25
50
|
var cwd = options.cwd || process.cwd();
|
|
26
51
|
var pkg = JSON.parse(_fs.default.readFileSync(_path.default.join(cwd, 'package.json'), 'utf8'));
|
|
@@ -53,7 +78,7 @@ function data(git, options, callback) {
|
|
|
53
78
|
queue.defer(_fs.default.rename.bind(null, binPath, "".concat(binPath, ".tsds")));
|
|
54
79
|
queue.defer(_fs.default.symlink.bind(null, _path.default.resolve.apply(null, [
|
|
55
80
|
cwd
|
|
56
|
-
].concat(pkg.bin[binName].split('/'))), binPath, 'file'));
|
|
81
|
+
].concat(_to_consumable_array(pkg.bin[binName].split('/')))), binPath, 'file'));
|
|
57
82
|
queue.await(function(err) {
|
|
58
83
|
console.log('------------------');
|
|
59
84
|
err ? callback(err) : callback(null, targetPath);
|
package/dist/cjs/lib/data.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["data.mjs"],"sourcesContent":["import fs from 'fs';\nimport path from 'path';\nimport spawn from 'cross-spawn-cb';\nimport mkdirp from 'mkdirp';\nimport { tmpdir } from 'os-shim';\nimport Queue from 'queue-cb';\nimport shortHash from 'short-hash';\n\nimport prepareGit from './prepareGit.mjs';\n\nexport default function data(git, options, callback) {\n const cwd = options.cwd || process.cwd();\n const pkg = JSON.parse(fs.readFileSync(path.join(cwd, 'package.json'), 'utf8'));\n const dest = path.join(tmpdir(), pkg.name, shortHash(cwd));\n const targetName = path.basename(git, path.extname(git));\n const targetPath = path.join(dest, targetName);\n mkdirp.sync(dest);\n\n const queue = new Queue(1);\n for (const binName in pkg.bin) {\n const packagePath = path.resolve(targetPath, 'node_modules', pkg.name);\n const binPath = path.resolve(targetPath, 'node_modules', '.bin', binName);\n\n console.log('------------------');\n console.log(`Preparing: ${targetPath}`);\n\n // clone or reset the git repo\n queue.defer(prepareGit.bind(null, git, options));\n\n // install\n queue.defer(spawn.bind(null, 'nvu', ['lts', '--silent', 'npm', 'install'], { stdio: 'inherit', cwd: targetPath }));\n\n // link package\n queue.defer(fs.rename.bind(null, packagePath, `${packagePath}.tsds`));\n queue.defer(fs.symlink.bind(null, cwd, packagePath, 'dir'));\n\n // link bin\n queue.defer(fs.rename.bind(null, binPath, `${binPath}.tsds`));\n queue.defer(fs.symlink.bind(null, path.resolve.apply(null, [cwd
|
|
1
|
+
{"version":3,"sources":["data.mjs"],"sourcesContent":["import fs from 'fs';\nimport path from 'path';\nimport spawn from 'cross-spawn-cb';\nimport mkdirp from 'mkdirp';\nimport { tmpdir } from 'os-shim';\nimport Queue from 'queue-cb';\nimport shortHash from 'short-hash';\n\nimport prepareGit from './prepareGit.mjs';\n\nexport default function data(git, options, callback) {\n const cwd = options.cwd || process.cwd();\n const pkg = JSON.parse(fs.readFileSync(path.join(cwd, 'package.json'), 'utf8'));\n const dest = path.join(tmpdir(), pkg.name, shortHash(cwd));\n const targetName = path.basename(git, path.extname(git));\n const targetPath = path.join(dest, targetName);\n mkdirp.sync(dest);\n\n const queue = new Queue(1);\n for (const binName in pkg.bin) {\n const packagePath = path.resolve(targetPath, 'node_modules', pkg.name);\n const binPath = path.resolve(targetPath, 'node_modules', '.bin', binName);\n\n console.log('------------------');\n console.log(`Preparing: ${targetPath}`);\n\n // clone or reset the git repo\n queue.defer(prepareGit.bind(null, git, options));\n\n // install\n queue.defer(spawn.bind(null, 'nvu', ['lts', '--silent', 'npm', 'install'], { stdio: 'inherit', cwd: targetPath }));\n\n // link package\n queue.defer(fs.rename.bind(null, packagePath, `${packagePath}.tsds`));\n queue.defer(fs.symlink.bind(null, cwd, packagePath, 'dir'));\n\n // link bin\n queue.defer(fs.rename.bind(null, binPath, `${binPath}.tsds`));\n queue.defer(fs.symlink.bind(null, path.resolve.apply(null, [cwd, ...pkg.bin[binName].split('/')]), binPath, 'file'));\n\n queue.await((err) => {\n console.log('------------------');\n err ? callback(err) : callback(null, targetPath);\n });\n }\n}\n"],"names":["data","git","options","callback","cwd","process","pkg","JSON","parse","fs","readFileSync","path","join","dest","tmpdir","name","shortHash","targetName","basename","extname","targetPath","mkdirp","sync","queue","Queue","binName","bin","packagePath","resolve","binPath","console","log","defer","prepareGit","bind","spawn","stdio","rename","symlink","apply","split","await","err"],"mappings":";;;;+BAUA;;;eAAwBA;;;yDAVT;2DACE;mEACC;6DACC;sBACI;8DACL;gEACI;iEAEC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAER,SAASA,KAAKC,GAAG,EAAEC,OAAO,EAAEC,QAAQ;IACjD,IAAMC,MAAMF,QAAQE,GAAG,IAAIC,QAAQD,GAAG;IACtC,IAAME,MAAMC,KAAKC,KAAK,CAACC,WAAE,CAACC,YAAY,CAACC,aAAI,CAACC,IAAI,CAACR,KAAK,iBAAiB;IACvE,IAAMS,OAAOF,aAAI,CAACC,IAAI,CAACE,IAAAA,cAAM,KAAIR,IAAIS,IAAI,EAAEC,IAAAA,kBAAS,EAACZ;IACrD,IAAMa,aAAaN,aAAI,CAACO,QAAQ,CAACjB,KAAKU,aAAI,CAACQ,OAAO,CAAClB;IACnD,IAAMmB,aAAaT,aAAI,CAACC,IAAI,CAACC,MAAMI;IACnCI,eAAM,CAACC,IAAI,CAACT;IAEZ,IAAMU,QAAQ,IAAIC,gBAAK,CAAC;IACxB,IAAK,IAAMC,WAAWnB,IAAIoB,GAAG,CAAE;QAC7B,IAAMC,cAAchB,aAAI,CAACiB,OAAO,CAACR,YAAY,gBAAgBd,IAAIS,IAAI;QACrE,IAAMc,UAAUlB,aAAI,CAACiB,OAAO,CAACR,YAAY,gBAAgB,QAAQK;QAEjEK,QAAQC,GAAG,CAAC;QACZD,QAAQC,GAAG,CAAC,AAAC,cAAwB,OAAXX;QAE1B,8BAA8B;QAC9BG,MAAMS,KAAK,CAACC,mBAAU,CAACC,IAAI,CAAC,MAAMjC,KAAKC;QAEvC,UAAU;QACVqB,MAAMS,KAAK,CAACG,qBAAK,CAACD,IAAI,CAAC,MAAM,OAAO;YAAC;YAAO;YAAY;YAAO;SAAU,EAAE;YAAEE,OAAO;YAAWhC,KAAKgB;QAAW;QAE/G,eAAe;QACfG,MAAMS,KAAK,CAACvB,WAAE,CAAC4B,MAAM,CAACH,IAAI,CAAC,MAAMP,aAAa,AAAC,GAAc,OAAZA,aAAY;QAC7DJ,MAAMS,KAAK,CAACvB,WAAE,CAAC6B,OAAO,CAACJ,IAAI,CAAC,MAAM9B,KAAKuB,aAAa;QAEpD,WAAW;QACXJ,MAAMS,KAAK,CAACvB,WAAE,CAAC4B,MAAM,CAACH,IAAI,CAAC,MAAML,SAAS,AAAC,GAAU,OAARA,SAAQ;QACrDN,MAAMS,KAAK,CAACvB,WAAE,CAAC6B,OAAO,CAACJ,IAAI,CAAC,MAAMvB,aAAI,CAACiB,OAAO,CAACW,KAAK,CAAC,MAAM;YAACnC;SAAoC,CAArC,OAAM,qBAAGE,IAAIoB,GAAG,CAACD,QAAQ,CAACe,KAAK,CAAC,SAAQX,SAAS;QAE5GN,MAAMkB,KAAK,CAAC,SAACC;YACXZ,QAAQC,GAAG,CAAC;YACZW,MAAMvC,SAASuC,OAAOvC,SAAS,MAAMiB;QACvC;IACF;AACF"}
|
package/dist/esm/lib/data.mjs
CHANGED
|
@@ -37,8 +37,9 @@ export default function data(git, options, callback) {
|
|
|
37
37
|
// link bin
|
|
38
38
|
queue.defer(fs.rename.bind(null, binPath, `${binPath}.tsds`));
|
|
39
39
|
queue.defer(fs.symlink.bind(null, path.resolve.apply(null, [
|
|
40
|
-
cwd
|
|
41
|
-
|
|
40
|
+
cwd,
|
|
41
|
+
...pkg.bin[binName].split('/')
|
|
42
|
+
]), binPath, 'file'));
|
|
42
43
|
queue.await((err)=>{
|
|
43
44
|
console.log('------------------');
|
|
44
45
|
err ? callback(err) : callback(null, targetPath);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["data.mjs"],"sourcesContent":["import fs from 'fs';\nimport path from 'path';\nimport spawn from 'cross-spawn-cb';\nimport mkdirp from 'mkdirp';\nimport { tmpdir } from 'os-shim';\nimport Queue from 'queue-cb';\nimport shortHash from 'short-hash';\n\nimport prepareGit from './prepareGit.mjs';\n\nexport default function data(git, options, callback) {\n const cwd = options.cwd || process.cwd();\n const pkg = JSON.parse(fs.readFileSync(path.join(cwd, 'package.json'), 'utf8'));\n const dest = path.join(tmpdir(), pkg.name, shortHash(cwd));\n const targetName = path.basename(git, path.extname(git));\n const targetPath = path.join(dest, targetName);\n mkdirp.sync(dest);\n\n const queue = new Queue(1);\n for (const binName in pkg.bin) {\n const packagePath = path.resolve(targetPath, 'node_modules', pkg.name);\n const binPath = path.resolve(targetPath, 'node_modules', '.bin', binName);\n\n console.log('------------------');\n console.log(`Preparing: ${targetPath}`);\n\n // clone or reset the git repo\n queue.defer(prepareGit.bind(null, git, options));\n\n // install\n queue.defer(spawn.bind(null, 'nvu', ['lts', '--silent', 'npm', 'install'], { stdio: 'inherit', cwd: targetPath }));\n\n // link package\n queue.defer(fs.rename.bind(null, packagePath, `${packagePath}.tsds`));\n queue.defer(fs.symlink.bind(null, cwd, packagePath, 'dir'));\n\n // link bin\n queue.defer(fs.rename.bind(null, binPath, `${binPath}.tsds`));\n queue.defer(fs.symlink.bind(null, path.resolve.apply(null, [cwd
|
|
1
|
+
{"version":3,"sources":["data.mjs"],"sourcesContent":["import fs from 'fs';\nimport path from 'path';\nimport spawn from 'cross-spawn-cb';\nimport mkdirp from 'mkdirp';\nimport { tmpdir } from 'os-shim';\nimport Queue from 'queue-cb';\nimport shortHash from 'short-hash';\n\nimport prepareGit from './prepareGit.mjs';\n\nexport default function data(git, options, callback) {\n const cwd = options.cwd || process.cwd();\n const pkg = JSON.parse(fs.readFileSync(path.join(cwd, 'package.json'), 'utf8'));\n const dest = path.join(tmpdir(), pkg.name, shortHash(cwd));\n const targetName = path.basename(git, path.extname(git));\n const targetPath = path.join(dest, targetName);\n mkdirp.sync(dest);\n\n const queue = new Queue(1);\n for (const binName in pkg.bin) {\n const packagePath = path.resolve(targetPath, 'node_modules', pkg.name);\n const binPath = path.resolve(targetPath, 'node_modules', '.bin', binName);\n\n console.log('------------------');\n console.log(`Preparing: ${targetPath}`);\n\n // clone or reset the git repo\n queue.defer(prepareGit.bind(null, git, options));\n\n // install\n queue.defer(spawn.bind(null, 'nvu', ['lts', '--silent', 'npm', 'install'], { stdio: 'inherit', cwd: targetPath }));\n\n // link package\n queue.defer(fs.rename.bind(null, packagePath, `${packagePath}.tsds`));\n queue.defer(fs.symlink.bind(null, cwd, packagePath, 'dir'));\n\n // link bin\n queue.defer(fs.rename.bind(null, binPath, `${binPath}.tsds`));\n queue.defer(fs.symlink.bind(null, path.resolve.apply(null, [cwd, ...pkg.bin[binName].split('/')]), binPath, 'file'));\n\n queue.await((err) => {\n console.log('------------------');\n err ? callback(err) : callback(null, targetPath);\n });\n }\n}\n"],"names":["fs","path","spawn","mkdirp","tmpdir","Queue","shortHash","prepareGit","data","git","options","callback","cwd","process","pkg","JSON","parse","readFileSync","join","dest","name","targetName","basename","extname","targetPath","sync","queue","binName","bin","packagePath","resolve","binPath","console","log","defer","bind","stdio","rename","symlink","apply","split","await","err"],"mappings":"AAAA,OAAOA,QAAQ,KAAK;AACpB,OAAOC,UAAU,OAAO;AACxB,OAAOC,WAAW,iBAAiB;AACnC,OAAOC,YAAY,SAAS;AAC5B,SAASC,MAAM,QAAQ,UAAU;AACjC,OAAOC,WAAW,WAAW;AAC7B,OAAOC,eAAe,aAAa;AAEnC,OAAOC,gBAAgB,mBAAmB;AAE1C,eAAe,SAASC,KAAKC,GAAG,EAAEC,OAAO,EAAEC,QAAQ;IACjD,MAAMC,MAAMF,QAAQE,GAAG,IAAIC,QAAQD,GAAG;IACtC,MAAME,MAAMC,KAAKC,KAA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YAAC3B;eAAQE,IAAIc,GAAG,CAACD,QAAQ,CAACa,KAAK,CAAC;SAAK,GAAGT,SAAS;QAE5GL,MAAMe,KAAK,CAAC,CAACC;YACXV,QAAQC,GAAG,CAAC;YACZS,MAAM/B,SAAS+B,OAAO/B,SAAS,MAAMa;QACvC;IACF;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tsds-lib-test",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Development stack for TypeScript libraries",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dev",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"esm"
|
|
58
58
|
]
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "09520b60cb5329acc3171d4630f9c33c471345f3"
|
|
61
61
|
}
|