@autter/runtime-cli 0.0.0-stage → 1.0.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 +91 -2
- package/dist/build-BXFh_jbP.d.cts +187 -0
- package/dist/build-BXFh_jbP.d.ts +187 -0
- package/dist/chunk-GGHHEUPQ.js +41 -0
- package/dist/chunk-SIRFO2QU.js +524 -0
- package/dist/cli.js +622 -0
- package/dist/index.cjs +581 -0
- package/dist/index.d.cts +50 -0
- package/dist/index.d.ts +50 -0
- package/dist/index.js +64 -0
- package/dist/next.cjs +628 -0
- package/dist/next.d.cts +23 -0
- package/dist/next.d.ts +23 -0
- package/dist/next.js +84 -0
- package/dist/vite.cjs +576 -0
- package/dist/vite.d.cts +54 -0
- package/dist/vite.d.ts +54 -0
- package/dist/vite.js +57 -0
- package/dist/webpack.cjs +559 -0
- package/dist/webpack.d.cts +46 -0
- package/dist/webpack.d.ts +46 -0
- package/dist/webpack.js +11 -0
- package/package.json +97 -5
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { A as AutterSourceMapsOptions } from './build-BXFh_jbP.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. Development
|
|
30
|
+
* builds are left alone.
|
|
31
|
+
*
|
|
32
|
+
* ```js
|
|
33
|
+
* // webpack.config.js
|
|
34
|
+
* const { AutterSourceMapsWebpackPlugin } = require("@autter/runtime-cli/webpack");
|
|
35
|
+
* module.exports = { plugins: [new AutterSourceMapsWebpackPlugin()] };
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
declare class AutterSourceMapsWebpackPlugin {
|
|
39
|
+
private readonly options;
|
|
40
|
+
constructor(options?: AutterSourceMapsOptions);
|
|
41
|
+
apply(compiler: CompilerLike): void;
|
|
42
|
+
}
|
|
43
|
+
/** Functional form: `plugins: [autterSourceMapsWebpack()]`. */
|
|
44
|
+
declare function autterSourceMapsWebpack(options?: AutterSourceMapsOptions): AutterSourceMapsWebpackPlugin;
|
|
45
|
+
|
|
46
|
+
export { AutterSourceMapsOptions, AutterSourceMapsWebpackPlugin, autterSourceMapsWebpack, AutterSourceMapsWebpackPlugin as default };
|
package/dist/webpack.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,98 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"name": "@autter/runtime-cli",
|
|
3
|
+
"version": "1.0.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
|
+
"peerDependencies": {
|
|
54
|
+
"next": ">=13",
|
|
55
|
+
"rollup": ">=3",
|
|
56
|
+
"vite": ">=4",
|
|
57
|
+
"webpack": ">=5"
|
|
58
|
+
},
|
|
59
|
+
"peerDependenciesMeta": {
|
|
60
|
+
"next": {
|
|
61
|
+
"optional": true
|
|
62
|
+
},
|
|
63
|
+
"rollup": {
|
|
64
|
+
"optional": true
|
|
65
|
+
},
|
|
66
|
+
"vite": {
|
|
67
|
+
"optional": true
|
|
68
|
+
},
|
|
69
|
+
"webpack": {
|
|
70
|
+
"optional": true
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"devDependencies": {
|
|
74
|
+
"@types/node": "^22.10.0",
|
|
75
|
+
"rollup": "^4.62.2",
|
|
76
|
+
"tsup": "^8.3.5",
|
|
77
|
+
"typescript": "^5.7.0"
|
|
78
|
+
},
|
|
79
|
+
"engines": {
|
|
80
|
+
"node": ">=20"
|
|
81
|
+
},
|
|
82
|
+
"publishConfig": {
|
|
83
|
+
"access": "public",
|
|
84
|
+
"provenance": true
|
|
85
|
+
},
|
|
86
|
+
"homepage": "https://github.com/Autter-dev/autter-runtime#readme",
|
|
87
|
+
"bugs": "https://github.com/Autter-dev/autter-runtime/issues",
|
|
88
|
+
"keywords": [
|
|
89
|
+
"source-maps",
|
|
90
|
+
"sourcemaps",
|
|
91
|
+
"debug-id",
|
|
92
|
+
"error-tracking",
|
|
93
|
+
"vite",
|
|
94
|
+
"webpack",
|
|
95
|
+
"nextjs",
|
|
96
|
+
"cli"
|
|
97
|
+
]
|
|
98
|
+
}
|