@autter/runtime-cli 0.0.0-stage → 1.1.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 +97 -2
- package/dist/build-CPXR9Xd3.d.cts +206 -0
- package/dist/build-CPXR9Xd3.d.ts +206 -0
- package/dist/chunk-DQLLM2NT.js +1035 -0
- package/dist/chunk-I2743JCN.js +59 -0
- package/dist/cli.js +1031 -0
- package/dist/index.cjs +1079 -0
- package/dist/index.d.cts +105 -0
- package/dist/index.d.ts +105 -0
- package/dist/index.js +72 -0
- package/dist/next.cjs +1165 -0
- package/dist/next.d.cts +24 -0
- package/dist/next.d.ts +24 -0
- package/dist/next.js +103 -0
- package/dist/vite.cjs +1099 -0
- package/dist/vite.d.cts +55 -0
- package/dist/vite.d.ts +55 -0
- package/dist/vite.js +83 -0
- package/dist/webpack.cjs +1075 -0
- package/dist/webpack.d.cts +53 -0
- package/dist/webpack.d.ts +53 -0
- package/dist/webpack.js +11 -0
- package/package.json +101 -5
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { A as AutterSourceMapsOptions } from './build-CPXR9Xd3.cjs';
|
|
2
|
+
|
|
3
|
+
/** The parts of webpack's types this plugin touches (structural, so webpack
|
|
4
|
+
* is not a dependency). */
|
|
5
|
+
interface CompilationLike {
|
|
6
|
+
outputOptions: {
|
|
7
|
+
path?: string;
|
|
8
|
+
publicPath?: unknown;
|
|
9
|
+
};
|
|
10
|
+
getAssets(): ReadonlyArray<{
|
|
11
|
+
name: string;
|
|
12
|
+
}>;
|
|
13
|
+
}
|
|
14
|
+
interface CompilerLike {
|
|
15
|
+
options: {
|
|
16
|
+
mode?: string;
|
|
17
|
+
devtool?: string | false;
|
|
18
|
+
};
|
|
19
|
+
outputPath?: string;
|
|
20
|
+
hooks: {
|
|
21
|
+
afterEmit: {
|
|
22
|
+
tapPromise(name: string, fn: (compilation: CompilationLike) => Promise<void>): void;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* webpack 5 plugin: turns on `hidden-source-map` in production builds that
|
|
28
|
+
* have no `devtool`, gives every emitted JS asset a debug id after emit, and
|
|
29
|
+
* uploads the maps when AUTTER_RUNTIME_KEY (or `key`) is set. Maps it turned
|
|
30
|
+
* on are deleted after the upload step whatever its outcome; without a key
|
|
31
|
+
* it turns none on. Development builds are left alone.
|
|
32
|
+
*
|
|
33
|
+
* ```js
|
|
34
|
+
* // webpack.config.js
|
|
35
|
+
* const { AutterSourceMapsWebpackPlugin } = require("@autter/runtime-cli/webpack");
|
|
36
|
+
* module.exports = { plugins: [new AutterSourceMapsWebpackPlugin()] };
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
declare class AutterSourceMapsWebpackPlugin {
|
|
40
|
+
private readonly options;
|
|
41
|
+
/** Set by withAutterSourceMaps, which chooses the devtool itself. */
|
|
42
|
+
private readonly internal;
|
|
43
|
+
constructor(options?: AutterSourceMapsOptions,
|
|
44
|
+
/** Set by withAutterSourceMaps, which chooses the devtool itself. */
|
|
45
|
+
internal?: {
|
|
46
|
+
ownMaps?: boolean;
|
|
47
|
+
});
|
|
48
|
+
apply(compiler: CompilerLike): void;
|
|
49
|
+
}
|
|
50
|
+
/** Functional form: `plugins: [autterSourceMapsWebpack()]`. */
|
|
51
|
+
declare function autterSourceMapsWebpack(options?: AutterSourceMapsOptions): AutterSourceMapsWebpackPlugin;
|
|
52
|
+
|
|
53
|
+
export { AutterSourceMapsOptions, AutterSourceMapsWebpackPlugin, autterSourceMapsWebpack, AutterSourceMapsWebpackPlugin as default };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { A as AutterSourceMapsOptions } from './build-CPXR9Xd3.js';
|
|
2
|
+
|
|
3
|
+
/** The parts of webpack's types this plugin touches (structural, so webpack
|
|
4
|
+
* is not a dependency). */
|
|
5
|
+
interface CompilationLike {
|
|
6
|
+
outputOptions: {
|
|
7
|
+
path?: string;
|
|
8
|
+
publicPath?: unknown;
|
|
9
|
+
};
|
|
10
|
+
getAssets(): ReadonlyArray<{
|
|
11
|
+
name: string;
|
|
12
|
+
}>;
|
|
13
|
+
}
|
|
14
|
+
interface CompilerLike {
|
|
15
|
+
options: {
|
|
16
|
+
mode?: string;
|
|
17
|
+
devtool?: string | false;
|
|
18
|
+
};
|
|
19
|
+
outputPath?: string;
|
|
20
|
+
hooks: {
|
|
21
|
+
afterEmit: {
|
|
22
|
+
tapPromise(name: string, fn: (compilation: CompilationLike) => Promise<void>): void;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* webpack 5 plugin: turns on `hidden-source-map` in production builds that
|
|
28
|
+
* have no `devtool`, gives every emitted JS asset a debug id after emit, and
|
|
29
|
+
* uploads the maps when AUTTER_RUNTIME_KEY (or `key`) is set. Maps it turned
|
|
30
|
+
* on are deleted after the upload step whatever its outcome; without a key
|
|
31
|
+
* it turns none on. Development builds are left alone.
|
|
32
|
+
*
|
|
33
|
+
* ```js
|
|
34
|
+
* // webpack.config.js
|
|
35
|
+
* const { AutterSourceMapsWebpackPlugin } = require("@autter/runtime-cli/webpack");
|
|
36
|
+
* module.exports = { plugins: [new AutterSourceMapsWebpackPlugin()] };
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
declare class AutterSourceMapsWebpackPlugin {
|
|
40
|
+
private readonly options;
|
|
41
|
+
/** Set by withAutterSourceMaps, which chooses the devtool itself. */
|
|
42
|
+
private readonly internal;
|
|
43
|
+
constructor(options?: AutterSourceMapsOptions,
|
|
44
|
+
/** Set by withAutterSourceMaps, which chooses the devtool itself. */
|
|
45
|
+
internal?: {
|
|
46
|
+
ownMaps?: boolean;
|
|
47
|
+
});
|
|
48
|
+
apply(compiler: CompilerLike): void;
|
|
49
|
+
}
|
|
50
|
+
/** Functional form: `plugins: [autterSourceMapsWebpack()]`. */
|
|
51
|
+
declare function autterSourceMapsWebpack(options?: AutterSourceMapsOptions): AutterSourceMapsWebpackPlugin;
|
|
52
|
+
|
|
53
|
+
export { AutterSourceMapsOptions, AutterSourceMapsWebpackPlugin, autterSourceMapsWebpack, AutterSourceMapsWebpackPlugin as default };
|
package/dist/webpack.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,102 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"name": "@autter/runtime-cli",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Readable stack traces for Autter Runtime: inject debug ids into JS bundles and upload their source maps (CLI, Vite/Rollup, webpack and Next.js plugins)",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.cjs",
|
|
8
|
+
"module": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/index.js",
|
|
14
|
+
"require": "./dist/index.cjs"
|
|
15
|
+
},
|
|
16
|
+
"./vite": {
|
|
17
|
+
"types": "./dist/vite.d.ts",
|
|
18
|
+
"import": "./dist/vite.js",
|
|
19
|
+
"require": "./dist/vite.cjs"
|
|
20
|
+
},
|
|
21
|
+
"./rollup": {
|
|
22
|
+
"types": "./dist/vite.d.ts",
|
|
23
|
+
"import": "./dist/vite.js",
|
|
24
|
+
"require": "./dist/vite.cjs"
|
|
25
|
+
},
|
|
26
|
+
"./webpack": {
|
|
27
|
+
"types": "./dist/webpack.d.ts",
|
|
28
|
+
"import": "./dist/webpack.js",
|
|
29
|
+
"require": "./dist/webpack.cjs"
|
|
30
|
+
},
|
|
31
|
+
"./next": {
|
|
32
|
+
"types": "./dist/next.d.ts",
|
|
33
|
+
"import": "./dist/next.js",
|
|
34
|
+
"require": "./dist/next.cjs"
|
|
35
|
+
},
|
|
36
|
+
"./package.json": "./package.json"
|
|
37
|
+
},
|
|
38
|
+
"bin": {
|
|
39
|
+
"autter-runtime": "./dist/cli.js"
|
|
40
|
+
},
|
|
41
|
+
"files": [
|
|
42
|
+
"dist"
|
|
43
|
+
],
|
|
44
|
+
"repository": {
|
|
45
|
+
"type": "git",
|
|
46
|
+
"url": "https://github.com/Autter-dev/autter-runtime.git",
|
|
47
|
+
"directory": "packages/runtime-cli"
|
|
48
|
+
},
|
|
49
|
+
"scripts": {
|
|
50
|
+
"build": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsup",
|
|
51
|
+
"test": "npm run build -w @autter/otlp-ingester && npm run build && node --test test/*.test.mjs"
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"acorn": "^8.17.0"
|
|
55
|
+
},
|
|
56
|
+
"peerDependencies": {
|
|
57
|
+
"next": ">=13",
|
|
58
|
+
"rollup": ">=3",
|
|
59
|
+
"vite": ">=4",
|
|
60
|
+
"webpack": ">=5"
|
|
61
|
+
},
|
|
62
|
+
"peerDependenciesMeta": {
|
|
63
|
+
"next": {
|
|
64
|
+
"optional": true
|
|
65
|
+
},
|
|
66
|
+
"rollup": {
|
|
67
|
+
"optional": true
|
|
68
|
+
},
|
|
69
|
+
"vite": {
|
|
70
|
+
"optional": true
|
|
71
|
+
},
|
|
72
|
+
"webpack": {
|
|
73
|
+
"optional": true
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"devDependencies": {
|
|
77
|
+
"@types/node": "^22.10.0",
|
|
78
|
+
"esbuild": "^0.28.1",
|
|
79
|
+
"rollup": "^4.62.2",
|
|
80
|
+
"tsup": "^8.3.5",
|
|
81
|
+
"typescript": "^5.7.0"
|
|
82
|
+
},
|
|
83
|
+
"engines": {
|
|
84
|
+
"node": ">=20"
|
|
85
|
+
},
|
|
86
|
+
"publishConfig": {
|
|
87
|
+
"access": "public",
|
|
88
|
+
"provenance": true
|
|
89
|
+
},
|
|
90
|
+
"homepage": "https://github.com/Autter-dev/autter-runtime#readme",
|
|
91
|
+
"bugs": "https://github.com/Autter-dev/autter-runtime/issues",
|
|
92
|
+
"keywords": [
|
|
93
|
+
"source-maps",
|
|
94
|
+
"sourcemaps",
|
|
95
|
+
"debug-id",
|
|
96
|
+
"error-tracking",
|
|
97
|
+
"vite",
|
|
98
|
+
"webpack",
|
|
99
|
+
"nextjs",
|
|
100
|
+
"cli"
|
|
101
|
+
]
|
|
102
|
+
}
|