webpipe-js 0.1.2 → 0.1.3
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/index.cjs +0 -24
- package/dist/index.mjs +0 -13
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
15
|
}
|
|
18
16
|
return to;
|
|
19
17
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
19
|
|
|
30
20
|
// src/index.ts
|
|
@@ -39,7 +29,6 @@ __export(index_exports, {
|
|
|
39
29
|
module.exports = __toCommonJS(index_exports);
|
|
40
30
|
|
|
41
31
|
// src/parser.ts
|
|
42
|
-
var import_meta = {};
|
|
43
32
|
var Parser = class {
|
|
44
33
|
constructor(text) {
|
|
45
34
|
this.pos = 0;
|
|
@@ -698,19 +687,6 @@ function formatWhen(when) {
|
|
|
698
687
|
return `executing variable ${when.varType} ${when.name}`;
|
|
699
688
|
}
|
|
700
689
|
}
|
|
701
|
-
if (import_meta.url === `file://${process.argv[1]}`) {
|
|
702
|
-
(async () => {
|
|
703
|
-
const fs = await import("fs/promises");
|
|
704
|
-
const path = process.argv[2];
|
|
705
|
-
if (!path) {
|
|
706
|
-
console.error("Usage: node dist/index.mjs <file.wp>");
|
|
707
|
-
process.exit(1);
|
|
708
|
-
}
|
|
709
|
-
const src = await fs.readFile(path, "utf8");
|
|
710
|
-
const program = parseProgram(src);
|
|
711
|
-
console.log(JSON.stringify(program, null, 2));
|
|
712
|
-
})();
|
|
713
|
-
}
|
|
714
690
|
// Annotate the CommonJS export names for ESM import in node:
|
|
715
691
|
0 && (module.exports = {
|
|
716
692
|
getPipelineRanges,
|
package/dist/index.mjs
CHANGED
|
@@ -657,19 +657,6 @@ function formatWhen(when) {
|
|
|
657
657
|
return `executing variable ${when.varType} ${when.name}`;
|
|
658
658
|
}
|
|
659
659
|
}
|
|
660
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
661
|
-
(async () => {
|
|
662
|
-
const fs = await import("fs/promises");
|
|
663
|
-
const path = process.argv[2];
|
|
664
|
-
if (!path) {
|
|
665
|
-
console.error("Usage: node dist/index.mjs <file.wp>");
|
|
666
|
-
process.exit(1);
|
|
667
|
-
}
|
|
668
|
-
const src = await fs.readFile(path, "utf8");
|
|
669
|
-
const program = parseProgram(src);
|
|
670
|
-
console.log(JSON.stringify(program, null, 2));
|
|
671
|
-
})();
|
|
672
|
-
}
|
|
673
660
|
export {
|
|
674
661
|
getPipelineRanges,
|
|
675
662
|
getVariableRanges,
|