@atproto-labs/rollup-plugin-bundle-manifest 0.1.0 → 0.1.2
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/LICENSE.txt +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +8 -2
- package/CHANGELOG.md +0 -7
- package/src/index.ts +0 -76
- package/tsconfig.build.json +0 -8
- package/tsconfig.json +0 -4
package/LICENSE.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Dual MIT/Apache-2.0 License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2022-
|
|
3
|
+
Copyright (c) 2022-2025 Bluesky PBC, and Contributors
|
|
4
4
|
|
|
5
5
|
Except as otherwise noted in individual files, this software is licensed under the MIT license (<http://opensource.org/licenses/MIT>), or the Apache License, Version 2.0 (<http://www.apache.org/licenses/LICENSE-2.0>).
|
|
6
6
|
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,KAAK,SAAS,GAAG;IACf,IAAI,EAAE,OAAO,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,KAAK,SAAS,GAAG;IACf,IAAI,EAAE,OAAO,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,cAAc,EAAE,OAAO,CAAA;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,eAAe,EAAE,OAAO,CAAA;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,SAAS,CAAA;AAEhD,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;AAEnD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,IAA6B,EAC7B,IAAY,GACb,GAAE;IACD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,OAAO,CAAA;CACV,GAAG,MAAM,CAAC,KAAK,CAAC,CAwCrB"}
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = bundleManifest;
|
|
6
7
|
const node_crypto_1 = require("node:crypto");
|
|
7
8
|
const node_path_1 = require("node:path");
|
|
8
9
|
const mime_1 = __importDefault(require("mime"));
|
|
@@ -44,5 +45,4 @@ function bundleManifest({ name = 'bundle-manifest.json', data = false, } = {}) {
|
|
|
44
45
|
},
|
|
45
46
|
};
|
|
46
47
|
}
|
|
47
|
-
exports.default = bundleManifest;
|
|
48
48
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AA4BA,iCA8CC;AA1ED,6CAAwC;AACxC,yCAAmC;AACnC,gDAAuB;AA0BvB,SAAwB,cAAc,CAAC,EACrC,IAAI,GAAG,s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c,EAAE,KAAK,CAAC,cAAc;wBACpC,cAAc,EAAE,KAAK,CAAC,cAAc;wBACpC,OAAO,EAAE,KAAK,CAAC,OAAO;wBACtB,eAAe,EAAE,KAAK,CAAC,eAAe;wBACtC,IAAI,EAAE,KAAK,CAAC,IAAI;qBACjB,CAAA;gBACH,CAAC;YACH,CAAC;YAED,IAAI,CAAC,QAAQ,CAAC;gBACZ,IAAI,EAAE,OAAO;gBACb,QAAQ,EAAE,IAAI;gBACd,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;aAC1C,CAAC,CAAA;QACJ,CAAC;KACF,CAAA;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atproto-labs/rollup-plugin-bundle-manifest",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Library for generating a manifest of bundled files from a Rollup build",
|
|
6
6
|
"keywords": [
|
|
@@ -23,6 +23,12 @@
|
|
|
23
23
|
"default": "./dist/index.js"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
|
+
"engines": {
|
|
27
|
+
"node": ">=18.7.0"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"dist"
|
|
31
|
+
],
|
|
26
32
|
"dependencies": {
|
|
27
33
|
"mime": "^3.0.0"
|
|
28
34
|
},
|
|
@@ -31,7 +37,7 @@
|
|
|
31
37
|
},
|
|
32
38
|
"devDependencies": {
|
|
33
39
|
"rollup": "^4.10.0",
|
|
34
|
-
"typescript": "^5.
|
|
40
|
+
"typescript": "^5.6.3"
|
|
35
41
|
},
|
|
36
42
|
"scripts": {
|
|
37
43
|
"build": "tsc --build tsconfig.json"
|
package/CHANGELOG.md
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# @atproto-labs/rollup-plugin-bundle-manifest
|
|
2
|
-
|
|
3
|
-
## 0.1.0
|
|
4
|
-
|
|
5
|
-
### Minor Changes
|
|
6
|
-
|
|
7
|
-
- [#2482](https://github.com/bluesky-social/atproto/pull/2482) [`a8d6c1123`](https://github.com/bluesky-social/atproto/commit/a8d6c112359f5c4c0cfbe2df63443ed275f2a646) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Add OAuth provider capability & support for DPoP signed tokens
|
package/src/index.ts
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { createHash } from 'node:crypto'
|
|
2
|
-
import { extname } from 'node:path'
|
|
3
|
-
|
|
4
|
-
import mime from 'mime'
|
|
5
|
-
import { Plugin } from 'rollup'
|
|
6
|
-
|
|
7
|
-
type AssetItem = {
|
|
8
|
-
type: 'asset'
|
|
9
|
-
mime?: string
|
|
10
|
-
sha256: string
|
|
11
|
-
data?: string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
type ChunkItem = {
|
|
15
|
-
type: 'chunk'
|
|
16
|
-
mime: string
|
|
17
|
-
sha256: string
|
|
18
|
-
dynamicImports: string[]
|
|
19
|
-
isDynamicEntry: boolean
|
|
20
|
-
isEntry: boolean
|
|
21
|
-
isImplicitEntry: boolean
|
|
22
|
-
name: string
|
|
23
|
-
data?: string
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export type ManifestItem = AssetItem | ChunkItem
|
|
27
|
-
|
|
28
|
-
export type Manifest = Record<string, ManifestItem>
|
|
29
|
-
|
|
30
|
-
export default function bundleManifest({
|
|
31
|
-
name = 'bundle-manifest.json',
|
|
32
|
-
data = false,
|
|
33
|
-
}: {
|
|
34
|
-
name?: string
|
|
35
|
-
data?: boolean
|
|
36
|
-
} = {}): Plugin {
|
|
37
|
-
return {
|
|
38
|
-
name: 'bundle-manifest',
|
|
39
|
-
generateBundle(outputOptions, bundle) {
|
|
40
|
-
const manifest: Manifest = {}
|
|
41
|
-
|
|
42
|
-
for (const [fileName, chunk] of Object.entries(bundle)) {
|
|
43
|
-
if (chunk.type === 'asset') {
|
|
44
|
-
manifest[fileName] = {
|
|
45
|
-
type: chunk.type,
|
|
46
|
-
data: data
|
|
47
|
-
? Buffer.from(chunk.source).toString('base64')
|
|
48
|
-
: undefined,
|
|
49
|
-
mime: mime.getType(extname(fileName)) || undefined,
|
|
50
|
-
sha256: createHash('sha256').update(chunk.source).digest('base64'),
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
if (chunk.type === 'chunk') {
|
|
55
|
-
manifest[fileName] = {
|
|
56
|
-
type: chunk.type,
|
|
57
|
-
data: data ? Buffer.from(chunk.code).toString('base64') : undefined,
|
|
58
|
-
mime: 'application/javascript',
|
|
59
|
-
sha256: createHash('sha256').update(chunk.code).digest('base64'),
|
|
60
|
-
dynamicImports: chunk.dynamicImports,
|
|
61
|
-
isDynamicEntry: chunk.isDynamicEntry,
|
|
62
|
-
isEntry: chunk.isEntry,
|
|
63
|
-
isImplicitEntry: chunk.isImplicitEntry,
|
|
64
|
-
name: chunk.name,
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
this.emitFile({
|
|
70
|
-
type: 'asset',
|
|
71
|
-
fileName: name,
|
|
72
|
-
source: JSON.stringify(manifest, null, 2),
|
|
73
|
-
})
|
|
74
|
-
},
|
|
75
|
-
}
|
|
76
|
-
}
|
package/tsconfig.build.json
DELETED
package/tsconfig.json
DELETED