@cparra/apex-reflection 2.9.4 → 2.9.5

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.
Files changed (2) hide show
  1. package/out.js +125 -0
  2. package/package.json +1 -1
package/out.js CHANGED
@@ -1,3 +1,128 @@
1
+ // make sure to keep this as 'var'
2
+ // we don't want block scoping
3
+
4
+ var dartNodePreambleSelf = typeof global !== "undefined" ? global : window;
5
+
6
+ var self = Object.create(dartNodePreambleSelf);
7
+
8
+ self.scheduleImmediate = typeof setImmediate !== "undefined"
9
+ ? function (cb) {
10
+ setImmediate(cb);
11
+ }
12
+ : function (cb) {
13
+ setTimeout(cb, 0);
14
+ };
15
+
16
+ // CommonJS globals.
17
+ self.require = require;
18
+ self.exports = exports;
19
+
20
+ // Node.js specific exports, check to see if they exist & or polyfilled
21
+
22
+ if (typeof process !== "undefined") {
23
+ self.process = process;
24
+ }
25
+
26
+ if (typeof __dirname !== "undefined") {
27
+ self.__dirname = __dirname;
28
+ }
29
+
30
+ if (typeof __filename !== "undefined") {
31
+ self.__filename = __filename;
32
+ }
33
+
34
+ if (typeof Buffer !== "undefined") {
35
+ self.Buffer = Buffer;
36
+ }
37
+
38
+ // if we're running in a browser, Dart supports most of this out of box
39
+ // make sure we only run these in Node.js environment
40
+
41
+ var dartNodeIsActuallyNode = !dartNodePreambleSelf.window
42
+
43
+ try {
44
+ // Check if we're in a Web Worker instead.
45
+ if ("undefined" !== typeof WorkerGlobalScope && dartNodePreambleSelf instanceof WorkerGlobalScope) {
46
+ dartNodeIsActuallyNode = false;
47
+ }
48
+
49
+ // Check if we're in Electron, with Node.js integration, and override if true.
50
+ if ("undefined" !== typeof process && process.versions && process.versions.hasOwnProperty('electron') && process.versions.hasOwnProperty('node')) {
51
+ dartNodeIsActuallyNode = true;
52
+ }
53
+ } catch (e) {
54
+ }
55
+
56
+ if (dartNodeIsActuallyNode) {
57
+ // This line is to:
58
+ // 1) Prevent Webpack from bundling.
59
+ // 2) In Webpack on Node.js, make sure we're using the native Node.js require, which is available via __non_webpack_require__
60
+ // https://github.com/mbullington/node_preamble.dart/issues/18#issuecomment-527305561
61
+ var url = ("undefined" !== typeof __webpack_require__ ? __non_webpack_require__ : require)("url");
62
+
63
+ // Setting `self.location=` in Electron throws a `TypeError`, so we define it
64
+ // as a property instead to be safe.
65
+ Object.defineProperty(self, "location", {
66
+ value: {
67
+ get href() {
68
+ if (url.pathToFileURL) {
69
+ return url.pathToFileURL(process.cwd()).href + "/";
70
+ } else {
71
+ // This isn't really a correct transformation, but it's the best we have
72
+ // for versions of Node <10.12.0 which introduced `url.pathToFileURL()`.
73
+ // For example, it will fail for paths that contain characters that need
74
+ // to be escaped in URLs.
75
+ return "file://" + (function () {
76
+ var cwd = process.cwd();
77
+ if (process.platform != "win32") return cwd;
78
+ return "/" + cwd.replace(/\\/g, "/");
79
+ })() + "/"
80
+ }
81
+ }
82
+ }
83
+ });
84
+
85
+ (function () {
86
+ function computeCurrentScript() {
87
+ try {
88
+ throw new Error();
89
+ } catch (e) {
90
+ var stack = e.stack;
91
+ var re = new RegExp("^ *at [^(]*\\((.*):[0-9]*:[0-9]*\\)$", "mg");
92
+ var lastMatch = null;
93
+ do {
94
+ var match = re.exec(stack);
95
+ if (match != null) lastMatch = match;
96
+ } while (match != null);
97
+ return lastMatch[1];
98
+ }
99
+ }
100
+
101
+ // Setting `self.document=` isn't known to throw an error anywhere like
102
+ // `self.location=` does on Electron, but it's better to be future-proof
103
+ // just in case..
104
+ var cachedCurrentScript = null;
105
+ Object.defineProperty(self, "document", {
106
+ value: {
107
+ get currentScript() {
108
+ if (cachedCurrentScript == null) {
109
+ cachedCurrentScript = {src: computeCurrentScript()};
110
+ }
111
+ return cachedCurrentScript;
112
+ }
113
+ }
114
+ });
115
+ })();
116
+
117
+ self.dartDeferredLibraryLoader = function (uri, successCallback, errorCallback) {
118
+ try {
119
+ load(uri);
120
+ successCallback();
121
+ } catch (error) {
122
+ errorCallback(error);
123
+ }
124
+ };
125
+ }
1
126
  (function dartProgram(){function copyProperties(a,b){var s=Object.keys(a)
2
127
  for(var r=0;r<s.length;r++){var q=s[r]
3
128
  b[q]=a[q]}}function mixinPropertiesHard(a,b){var s=Object.keys(a)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cparra/apex-reflection",
3
- "version": "2.9.4",
3
+ "version": "2.9.5",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {