@aiot-toolkit/parser 2.0.5-widget-provider-beta.1 → 2.0.5-widget-provider-beta.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.
@@ -798,6 +798,14 @@ const elementConfig = {
798
798
  enums: ['none', 'forwards']
799
799
  }
800
800
  }
801
+ },
802
+ 'widget-container': {
803
+ events: ['load'],
804
+ attributes: {
805
+ uri: {},
806
+ size: {},
807
+ uidata: {}
808
+ }
801
809
  }
802
810
  }
803
811
  };
@@ -52,5 +52,9 @@ declare class SourceMapUtil {
52
52
  * @returns
53
53
  */
54
54
  static countStatementLines(originStr: string): number;
55
+ /**
56
+ * 拼接正文和source map
57
+ */
58
+ static concatSourceMap(content: string, sourceMap: string): string;
55
59
  }
56
60
  export default SourceMapUtil;
@@ -114,5 +114,11 @@ class SourceMapUtil {
114
114
  let lineCount = (originStr.match(/\n/g) || []).length + 1;
115
115
  return lineCount;
116
116
  }
117
+ /**
118
+ * 拼接正文和source map
119
+ */
120
+ static concatSourceMap(content, sourceMap) {
121
+ return `${content}\n//# sourceMappingURL=data:application/json;base64,${Buffer.from(sourceMap).toString('base64')}`;
122
+ }
117
123
  }
118
124
  var _default = exports.default = SourceMapUtil;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiot-toolkit/parser",
3
- "version": "2.0.5-widget-provider-beta.1",
3
+ "version": "2.0.5-widget-provider-beta.2",
4
4
  "description": "Parse the source code of aiot and convert it to the AST (Abstract Syntax Tree) of the target code.",
5
5
  "keywords": [
6
6
  "aiot",
@@ -20,7 +20,7 @@
20
20
  "test": "node ./__tests__/parser.test.js"
21
21
  },
22
22
  "dependencies": {
23
- "@aiot-toolkit/shared-utils": "2.0.5-widget-provider-beta.1",
23
+ "@aiot-toolkit/shared-utils": "2.0.5-widget-provider-beta.2",
24
24
  "@babel/core": "^7.23.6",
25
25
  "@babel/generator": "^7.24.10",
26
26
  "@babel/parser": "^7.24.8",
@@ -31,7 +31,7 @@
31
31
  "css-tree": "npm:aiot-css-tree@^2.3.1",
32
32
  "csstree-validator": "^3.0.0",
33
33
  "eslint": "^8.46.0",
34
- "file-lane": "2.0.5-widget-provider-beta.1",
34
+ "file-lane": "2.0.5-widget-provider-beta.2",
35
35
  "fs-extra": "^11.2.0",
36
36
  "google-protobuf": "^3.21.2",
37
37
  "less": "^4.2.0",
@@ -60,5 +60,5 @@
60
60
  "@types/tinycolor2": "^1.4.6",
61
61
  "babel-plugin-tester": "^11.0.4"
62
62
  },
63
- "gitHead": "64842a2c374b8b3b344cef377d9c032eaf1a99a7"
63
+ "gitHead": "4a8894bc66a9c78cd835ed6c1af74d054300e064"
64
64
  }