@atlassian/webresource-webpack-plugin 7.0.3 → 7.0.4-efd4a11
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/CHANGELOG.md +12 -0
- package/README.md +6 -3
- package/dist/AppResources.d.ts +8 -4
- package/dist/AppResources.js +17 -9
- package/dist/AppResources.js.map +1 -1
- package/dist/AppResourcesFactory.d.ts +1 -1
- package/dist/WebpackHelpers.d.ts +5 -5
- package/dist/WebpackHelpers.js +36 -54
- package/dist/WebpackHelpers.js.map +1 -1
- package/dist/WebpackRuntimeHelpers.d.ts +0 -2
- package/dist/WebpackRuntimeHelpers.js +1 -12
- package/dist/WebpackRuntimeHelpers.js.map +1 -1
- package/dist/WrmManifestPlugin.js.map +1 -1
- package/dist/WrmPlugin.d.ts +9 -3
- package/dist/WrmPlugin.js +133 -55
- package/dist/WrmPlugin.js.map +1 -1
- package/dist/deps/base-dependencies.js.map +1 -1
- package/dist/helpers/file-system.js +1 -2
- package/dist/helpers/file-system.js.map +1 -1
- package/dist/helpers/isRspackCompiler.d.ts +3 -0
- package/dist/helpers/isRspackCompiler.js +9 -0
- package/dist/helpers/isRspackCompiler.js.map +1 -0
- package/dist/helpers/options-parser.js +4 -1
- package/dist/helpers/options-parser.js.map +1 -1
- package/dist/helpers/renderCondition.js.map +1 -1
- package/dist/helpers/renderTransformations.d.ts +1 -1
- package/dist/helpers/renderTransformations.js.map +1 -1
- package/dist/helpers/web-resource-entrypoints.js.map +1 -1
- package/dist/helpers/web-resource-generator.js.map +1 -1
- package/dist/helpers/web-resource-parser.js.map +1 -1
- package/dist/helpers/xml.d.ts +2 -2
- package/dist/helpers/xml.js.map +1 -1
- package/dist/logger.js.map +1 -1
- package/dist/types/extracted-webpack-types.d.ts +9 -9
- package/dist/types/types.d.ts +27 -27
- package/dist/webpack-modules/WrmResourceModule.js.map +1 -1
- package/jest.config.js +16 -1
- package/package.json +20 -17
package/dist/types/types.d.ts
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
1
|
+
export type ArrayBaseType<T> = T extends Array<infer U> ? U : never;
|
|
2
|
+
export type Callable = (...args: any[]) => any;
|
|
3
|
+
export type ObjectOrMap = Record<string, unknown> | Map<string, unknown>;
|
|
4
|
+
export type ConditionParam = {
|
|
5
5
|
attributes?: {
|
|
6
6
|
[key: string]: string;
|
|
7
7
|
};
|
|
8
8
|
value?: string;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type ConditionClass = {
|
|
11
11
|
class: string;
|
|
12
12
|
invert?: boolean;
|
|
13
13
|
params?: ConditionParam[];
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export type Conditions = {
|
|
16
16
|
type: string;
|
|
17
17
|
conditions: Array<Conditions | ConditionClass>;
|
|
18
18
|
};
|
|
19
|
-
export
|
|
20
|
-
export
|
|
19
|
+
export type Condition = Conditions | ConditionClass | Array<Conditions | Condition>;
|
|
20
|
+
export type DeprecationInfo = {
|
|
21
21
|
sinceVersion?: string;
|
|
22
22
|
removeInVersion?: string;
|
|
23
23
|
alternative?: string;
|
|
24
24
|
extraInfo?: string;
|
|
25
25
|
} | true;
|
|
26
|
-
export
|
|
26
|
+
export type ProvidedDependency = {
|
|
27
27
|
dependency: string;
|
|
28
28
|
import: {
|
|
29
29
|
var: string;
|
|
30
30
|
amd?: string;
|
|
31
31
|
} | string;
|
|
32
32
|
};
|
|
33
|
-
export
|
|
33
|
+
export type DataProvider = {
|
|
34
34
|
key: string;
|
|
35
35
|
class: string;
|
|
36
36
|
};
|
|
37
|
-
export
|
|
37
|
+
export type ResourceParam = {
|
|
38
38
|
name: string;
|
|
39
39
|
value: string;
|
|
40
40
|
};
|
|
41
|
-
export
|
|
41
|
+
export type WebresourceObject = {
|
|
42
42
|
key?: string;
|
|
43
43
|
name?: string;
|
|
44
44
|
state?: string | boolean;
|
|
45
45
|
};
|
|
46
|
-
export
|
|
47
|
-
|
|
46
|
+
export type WebresourceType = string | WebresourceObject;
|
|
47
|
+
type MapOrObject<T> = Map<string, T> | {
|
|
48
48
|
[key: string]: T;
|
|
49
49
|
};
|
|
50
|
-
export
|
|
51
|
-
export
|
|
52
|
-
export
|
|
53
|
-
export
|
|
54
|
-
export
|
|
55
|
-
export
|
|
56
|
-
export
|
|
57
|
-
export
|
|
58
|
-
export
|
|
50
|
+
export type ContextMap = Map<string, string[]>;
|
|
51
|
+
export type TransformationMap = Map<string, string[]>;
|
|
52
|
+
export type ProvidedDependenciesMap = Map<string, ProvidedDependency>;
|
|
53
|
+
export type ConditionsMap = Map<string, Condition>;
|
|
54
|
+
export type DataProvidersMap = Map<string, DataProvider[]>;
|
|
55
|
+
export type DeprecationMap = Map<string, DeprecationInfo>;
|
|
56
|
+
export type ResourceParamMap = Map<string, ResourceParam[]>;
|
|
57
|
+
export type WebresourceMap = Map<string, WebresourceType>;
|
|
58
|
+
export type Options = {
|
|
59
59
|
/** @property pluginKey - The fully qualified plugin key. e.g.: com.atlassian.jira.plugins.my-jira-plugin */
|
|
60
60
|
pluginKey: string;
|
|
61
61
|
/** @property xmlDescriptors - Path to the directory where this plugin stores the descriptors about this plugin, used by the WRM to load your frontend code. */
|
|
@@ -101,7 +101,7 @@ export declare type Options = {
|
|
|
101
101
|
/** @property watchPrepare - In conjunction with watch mode - indicates that only "redirects" to a webserver should be build in this run. */
|
|
102
102
|
watchPrepare?: boolean;
|
|
103
103
|
};
|
|
104
|
-
export
|
|
104
|
+
export type ConsolidatedOptions = Options & Required<Omit<Options, 'wrmManifestPath' | 'singleRuntimeWebResourceKey' | 'packageName'>> & {
|
|
105
105
|
conditionMap: ConditionsMap;
|
|
106
106
|
contextMap: ContextMap;
|
|
107
107
|
dataProvidersMap: DataProvidersMap;
|
|
@@ -111,11 +111,11 @@ export declare type ConsolidatedOptions = Options & Required<Omit<Options, 'wrmM
|
|
|
111
111
|
transformationMap: TransformationMap;
|
|
112
112
|
webresourceKeyMap: WebresourceMap;
|
|
113
113
|
};
|
|
114
|
-
export
|
|
114
|
+
export type WrmResource = {
|
|
115
115
|
name: string;
|
|
116
116
|
location: string;
|
|
117
117
|
};
|
|
118
|
-
export
|
|
118
|
+
export type ChunkResourceDescriptor = {
|
|
119
119
|
attributes: {
|
|
120
120
|
key: string;
|
|
121
121
|
moduleId?: string;
|
|
@@ -128,5 +128,5 @@ export declare type ChunkResourceDescriptor = {
|
|
|
128
128
|
dataProviders?: DataProvider[];
|
|
129
129
|
externalResources?: WrmResource[];
|
|
130
130
|
};
|
|
131
|
-
export
|
|
131
|
+
export type AssetNames = Map<string, string>;
|
|
132
132
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WrmResourceModule.js","sourceRoot":"","sources":["../../src/webpack-modules/WrmResourceModule.ts"],"names":[],"mappings":";;;;;AAAA,gDAAwB;AAExB,8EAAsD;AAEtD,MAAqB,iBAAkB,SAAQ,4BAAkB;IAG/D,YAAY,2BAAmC,EAAE,MAAc,EAAE,cAAsB,EAAE,WAAmB;QAC1G,KAAK,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC;QAC3C,MAAM,YAAY,GAAG,2BAA2B,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC5D,IAAI,OAAO,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;QAE9B,yHAAyH;QACzH,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE;
|
|
1
|
+
{"version":3,"file":"WrmResourceModule.js","sourceRoot":"","sources":["../../src/webpack-modules/WrmResourceModule.ts"],"names":[],"mappings":";;;;;AAAA,gDAAwB;AAExB,8EAAsD;AAEtD,MAAqB,iBAAkB,SAAQ,4BAAkB;IAG/D,YAAY,2BAAmC,EAAE,MAAc,EAAE,cAAsB,EAAE,WAAmB;QAC1G,KAAK,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC;QAC3C,MAAM,YAAY,GAAG,2BAA2B,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC5D,IAAI,OAAO,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;QAE9B,yHAAyH;QACzH,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;YAC1D,MAAM,gBAAgB,GAAG,cAAI,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;YAC5D,OAAO,GAAG,cAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC;QACzD,CAAC;QAED,IAAI,CAAC,SAAS,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC;IAED,eAAe;QACb,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,WAAW;QACT,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;QACxC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;IAC5B,CAAC;CACF;AAzBD,oCAyBC"}
|
package/jest.config.js
CHANGED
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
const pkg = require('./package.json');
|
|
2
2
|
const baseConfig = require('../../jest.config.js');
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* @type {import('jest').Config}
|
|
6
|
+
*/
|
|
4
7
|
module.exports = {
|
|
5
8
|
...baseConfig,
|
|
6
|
-
projects: [
|
|
9
|
+
projects: [
|
|
10
|
+
{
|
|
11
|
+
preset: 'ts-jest',
|
|
12
|
+
displayName: 'webpack',
|
|
13
|
+
transform: baseConfig.transform,
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
preset: 'ts-jest',
|
|
17
|
+
displayName: 'rspack',
|
|
18
|
+
transform: baseConfig.transform,
|
|
19
|
+
setupFilesAfterEnv: ['./test/util/setup-rspack.ts'],
|
|
20
|
+
},
|
|
21
|
+
],
|
|
7
22
|
displayName: pkg.name,
|
|
8
23
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlassian/webresource-webpack-plugin",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.4-efd4a11",
|
|
4
4
|
"description": "Auto-generates web-resource definitions from your webpacked code, for usage in an Atlassian product or plugin.",
|
|
5
5
|
"main": "dist/WrmPlugin.js",
|
|
6
6
|
"types": "dist/WrmPlugin.d.ts",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"lodash": "4.17.21",
|
|
62
62
|
"pretty-data": "0.40.0",
|
|
63
|
-
"tapable": "2.2.
|
|
63
|
+
"tapable": "2.2.2",
|
|
64
64
|
"url-join": "4.0.1",
|
|
65
65
|
"uuid": "8.3.2"
|
|
66
66
|
},
|
|
@@ -69,29 +69,30 @@
|
|
|
69
69
|
"webpack-sources": "^1 || ^2"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
+
"@rspack/core": "^1.4.11",
|
|
72
73
|
"@types/glob": "7.2.0",
|
|
73
|
-
"@types/lodash": "4.14.
|
|
74
|
-
"@types/node": "
|
|
74
|
+
"@types/lodash": "4.14.202",
|
|
75
|
+
"@types/node": "22.17.2",
|
|
75
76
|
"@types/pretty-data": "0.40.3",
|
|
76
|
-
"@types/url-join": "4.0.
|
|
77
|
-
"@types/uuid": "8.3.
|
|
78
|
-
"@types/webpack-sources": "3.2.
|
|
79
|
-
"@types/xml-parser": "1.2.
|
|
77
|
+
"@types/url-join": "4.0.3",
|
|
78
|
+
"@types/uuid": "8.3.4",
|
|
79
|
+
"@types/webpack-sources": "3.2.3",
|
|
80
|
+
"@types/xml-parser": "1.2.33",
|
|
80
81
|
"css-loader": "5.2.7",
|
|
81
|
-
"del": "6.
|
|
82
|
-
"esbuild": "0.
|
|
83
|
-
"esbuild-register": "3.
|
|
82
|
+
"del": "6.1.1",
|
|
83
|
+
"esbuild": "0.25.9",
|
|
84
|
+
"esbuild-register": "3.6.0",
|
|
84
85
|
"file-loader": "6.2.0",
|
|
85
|
-
"glob": "7.2.
|
|
86
|
-
"jest": "
|
|
86
|
+
"glob": "7.2.3",
|
|
87
|
+
"jest": "29.7.0",
|
|
87
88
|
"jquery": "3.6.0",
|
|
88
89
|
"mini-css-extract-plugin": "2.8.1",
|
|
89
90
|
"style-loader": "2.0.0",
|
|
90
91
|
"ts-node": "10.4.0",
|
|
91
|
-
"typescript": "
|
|
92
|
-
"underscore": "1.13.
|
|
92
|
+
"typescript": "5.9.2",
|
|
93
|
+
"underscore": "1.13.7",
|
|
93
94
|
"webpack": "5.90.3",
|
|
94
|
-
"webpack-cli": "4.9.
|
|
95
|
+
"webpack-cli": "4.9.2",
|
|
95
96
|
"webpack-sources": "2.3.1",
|
|
96
97
|
"xml-parser": "1.2.1"
|
|
97
98
|
},
|
|
@@ -114,7 +115,9 @@
|
|
|
114
115
|
"build": "tsc -p tsconfig.json",
|
|
115
116
|
"verify": "tsc -p tsconfig.json --noEmit",
|
|
116
117
|
"test": "jest",
|
|
118
|
+
"test:webpack": "jest --selectProjects=webpack",
|
|
119
|
+
"test:rspack": "jest --selectProjects=rspack",
|
|
117
120
|
"test:watch": "jest --watch"
|
|
118
121
|
},
|
|
119
|
-
"gitHead": "
|
|
122
|
+
"gitHead": "fa43ff58de567f17ff53662043552e231a773c6d"
|
|
120
123
|
}
|