@wavemaker-ai/studio-runtime-integration 1.0.0-rc.647469

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.
@@ -0,0 +1,136 @@
1
+ var fs = require('fs');
2
+ var path = require('path');
3
+ var WM_NPM_SCOPE = require('../../wm-namespace').WM_NPM_SCOPE;
4
+ /**
5
+ * The function `getDtsFiles` recursively retrieves all .d.ts files within a given directory.
6
+ * @param {any} dirPath - The `dirPath` parameter is the directory path from which you want to retrieve
7
+ * all `.d.ts` files recursively.
8
+ * @param {any} filesList - The `filesList` parameter is an array that is used to store the paths of
9
+ * all the `.d.ts` files found within the directory specified by `dirPath`. The function recursively
10
+ * searches through the directory and its subdirectories to find all `.d.ts` files and adds their paths
11
+ * to the `
12
+ * @param {any} ignorePatterns - The `ignorePatterns` parameter is an array of regex patterns used to
13
+ * exclude certain files.
14
+ * @param {any} ignoreFolders - The `ignoreFolders` parameter is an array of folder names to be ignored.
15
+ * @returns The function `getDtsFiles` is returning an array containing the file paths of all the
16
+ * TypeScript declaration files (files with a `.d.ts` extension) found within the specified directory
17
+ * and its subdirectories.
18
+ */
19
+ var getDtsFiles = function (dirPath, filesList, ignorePatterns, ignoreFolders) {
20
+ if (filesList === void 0) { filesList = []; }
21
+ if (ignorePatterns === void 0) { ignorePatterns = []; }
22
+ if (ignoreFolders === void 0) { ignoreFolders = []; }
23
+ var entries = fs.readdirSync(dirPath, { withFileTypes: true });
24
+ var _loop_1 = function (entry) {
25
+ var fullPath = path.join(dirPath, entry.name);
26
+ if (entry.isDirectory()) {
27
+ if (!ignoreFolders.includes(entry.name)) {
28
+ getDtsFiles(fullPath, filesList, ignorePatterns, ignoreFolders);
29
+ }
30
+ }
31
+ else if (entry.name.endsWith('.d.ts') && !ignorePatterns.some(function (pattern) { return pattern.test(entry.name); })) {
32
+ filesList.push(fullPath);
33
+ }
34
+ };
35
+ for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
36
+ var entry = entries_1[_i];
37
+ _loop_1(entry);
38
+ }
39
+ return filesList;
40
+ };
41
+ /**
42
+ * The function fetches a file, removes import statements, export keywords, template literals, and
43
+ * lines starting with //#, and returns the concatenated content.
44
+ * @param {any} filePath - The `filePath` parameter in the `fetchAndConcatenate` function is a string
45
+ * that represents the path to a file that will be read and processed.
46
+ * @returns The function `fetchAndConcatenate` reads the content of a file specified by `filePath`,
47
+ * removes import statements, export keywords, backticks (escaping them), template literals, and lines
48
+ * starting with `//#`, and then returns the modified content as a concatenated string.
49
+ */
50
+ var fetchAndConcatenate = function (filePath) {
51
+ if (!fs.existsSync(filePath)) {
52
+ throw new Error("File not found: ".concat(filePath));
53
+ }
54
+ return fs.readFileSync(filePath, 'utf8')
55
+ .replace(/^import .*;$/gm, '') // Remove import statements
56
+ .replace(/^export /gm, '') // Remove export keyword
57
+ .replace(/`/g, '\\`') // Escape backticks
58
+ .replace(/\${[^}]*}/g, '') // Remove template literals
59
+ .replace(/^\/\/#/gm, ''); // Remove lines starting with //#
60
+ };
61
+ /**
62
+ * The `processFolder` function takes a folder path, retrieves all .d.ts files within the folder,
63
+ * concatenates their content, and returns a string with the concatenated content.
64
+ * @param {any} folderPath - The `folderPath` parameter in the `processFolder` function is the path to
65
+ * the folder containing the .d.ts files that need to be processed.
66
+ * @param {any} ignorePatterns - The `ignorePatterns` parameter is an array of regex patterns used to
67
+ * exclude certain files.
68
+ * @param {any} ignoreFolders - The `ignoreFolders` parameter is an array of folder names to be ignored.
69
+ * @returns The `processFolder` function is returning a string that contains the contents of all the
70
+ * ".d.ts" files in the specified folder path. The contents are concatenated together and prefixed with
71
+ * a comment indicating the folder path from which the contents were retrieved.
72
+ */
73
+ var processFolder = function (folderPath, ignorePatterns, ignoreFolders) {
74
+ if (ignorePatterns === void 0) { ignorePatterns = []; }
75
+ if (ignoreFolders === void 0) { ignoreFolders = []; }
76
+ var files = getDtsFiles(folderPath, [], ignorePatterns, ignoreFolders);
77
+ var concatenatedContent = files.map(fetchAndConcatenate).join('');
78
+ return "".concat(concatenatedContent, "\n");
79
+ };
80
+ /**
81
+ * The function `consolidateFolders` takes an array of folder paths, processes each path using the
82
+ * `processFolder` function, and returns a consolidated string of the processed folder paths.
83
+ * @param {any[]} folders - The `folders` parameter in the `consolidateFolders` function is an array
84
+ * that contains folder paths. Each folder path is represented as a string. The function uses the
85
+ * `reduce` method to iterate over the array of folder paths and calls the `processFolder` function on
86
+ * each path to process
87
+ * @param {any} ignorePatterns - The `ignorePatterns` parameter is an array of regex patterns used to
88
+ * exclude certain files.
89
+ * @param {any} ignoreFolders - The `ignoreFolders` parameter is an array of folder names to be ignored.
90
+ * @returns The `consolidateFolders` function is returning a string that is the result of concatenating
91
+ * the processed folder paths from the input array of folders. Each folder path is processed using the
92
+ * `processFolder` function before being concatenated to the accumulator.
93
+ */
94
+ var consolidateFolders = function (folders, ignorePatterns, ignoreFolders) {
95
+ if (ignorePatterns === void 0) { ignorePatterns = []; }
96
+ if (ignoreFolders === void 0) { ignoreFolders = []; }
97
+ return folders.reduce(function (acc, folderPath) {
98
+ return acc + "".concat(processFolder(folderPath, ignorePatterns, ignoreFolders));
99
+ }, '');
100
+ };
101
+ /**
102
+ * List of method names to ignore in code suggestions
103
+ * angular lifecycle hooks & components constructor should be skipped
104
+ */
105
+ var methodsToIgnore = [
106
+ 'constructor',
107
+ 'ngOnInit',
108
+ 'ngOnChanges',
109
+ 'ngDoCheck',
110
+ 'ngAfterViewInit',
111
+ 'ngAfterViewChecked',
112
+ 'ngAfterContentInit',
113
+ 'ngAfterContentChecked',
114
+ 'ngOnDestroy',
115
+ 'ngOnDetach',
116
+ 'ngOnAttach'
117
+ ];
118
+ try {
119
+ /* Consolidates the content of multiple .d.ts files from specified folders into a single file,
120
+ excluding certain files and methods. */
121
+ var folderPaths = ['src/app/code-intellisense', "node_modules/".concat(WM_NPM_SCOPE, "/app-ng-runtime/components"), "node_modules/".concat(WM_NPM_SCOPE, "/app-ng-runtime/variables/model"), "node_modules/".concat(WM_NPM_SCOPE, "/variables/src/model")];
122
+ var outputPath = 'src/app/code-intellisense/declaration-content.ts';
123
+ var ignorePatterns = [/index.d.ts$/, /public_api.d.ts$/, /router-outlet.directive.d.ts$/, /spa-page.directive.d.ts$/, /(\.props|\.module|\.utils)\.d\.ts$/]; // Add patterns to ignore
124
+ var ignoreFolders = ['framework', 'pipes', 'utils']; // Add folder names to ignore
125
+ var libContent_1 = "export const suggestions = `\n".concat(consolidateFolders(folderPaths, ignorePatterns, ignoreFolders), "`");
126
+ methodsToIgnore.forEach(function (method) {
127
+ var methodRegex = new RegExp("\\s*".concat(method, "\\s*\\([^)]*\\)(\\s*:\\s*void)?;?\\s*"), 'g');
128
+ libContent_1 = libContent_1.replace(methodRegex, '');
129
+ });
130
+ fs.writeFileSync(outputPath, libContent_1);
131
+ console.log('All widget contents have been successfully written to:', outputPath);
132
+ }
133
+ catch (error) {
134
+ console.error('Error processing widget files:', error);
135
+ }
136
+ //# sourceMappingURL=declaration-file-process-script.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"declaration-file-process-script.js","sourceRoot":"./","sources":["src/app/code-intellisense/declaration-file-process-script.ts"],"names":[],"mappings":"AAAA,IAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACzB,IAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AACrB,IAAA,YAAY,GAAK,OAAO,CAAC,oBAAoB,CAAC,aAAlC,CAAmC;AAEvD;;;;;;;;;;;;;;GAcG;AACH,IAAM,WAAW,GAAG,UAAC,OAAY,EAAE,SAAmB,EAAE,cAAwB,EAAE,aAAuB;IAAtE,0BAAA,EAAA,cAAmB;IAAE,+BAAA,EAAA,mBAAwB;IAAE,8BAAA,EAAA,kBAAuB;IACvG,IAAM,OAAO,GAAG,EAAE,CAAC,WAAW,CAAC,OAAO,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;4BACtD,KAAK;QACd,IAAM,QAAQ,GAAG,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A+B,EAAE,0BAA0B,EAAE,oCAAoC,CAAC,CAAC,CAAE,yBAAyB;IACzL,IAAM,aAAa,GAAG,CAAC,WAAW,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAE,6BAA6B;IACrF,IAAI,YAAU,GAAG,wCAAkC,kBAAkB,CAAC,WAAW,EAAE,cAAc,EAAE,aAAa,CAAC,MAAI,CAAC;IACtH,eAAe,CAAC,OAAO,CAAC,UAAA,MAAM;QAC5B,IAAM,WAAW,GAAG,IAAI,MAAM,CAAC,cAAO,MAAM,0CAAuC,EAAE,GAAG,CAAC,CAAC;QAC1F,YAAU,GAAG,YAAU,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IACnD,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,aAAa,CAAC,UAAU,EAAE,YAAU,CAAC,CAAC;IACzC,OAAO,CAAC,GAAG,CAAC,wDAAwD,EAAE,UAAU,CAAC,CAAC;AACpF,CAAC;AAAC,OAAO,KAAK,EAAE,CAAC;IACf,OAAO,CAAC,KAAK,CAAC,gCAAgC,EAAE,KAAK,CAAC,CAAC;AACzD,CAAC","sourcesContent":["const fs = require('fs');\nconst path = require('path');\nconst { WM_NPM_SCOPE } = require('../../wm-namespace');\n\n/**\n * The function `getDtsFiles` recursively retrieves all .d.ts files within a given directory.\n * @param {any} dirPath - The `dirPath` parameter is the directory path from which you want to retrieve\n * all `.d.ts` files recursively.\n * @param {any} filesList - The `filesList` parameter is an array that is used to store the paths of\n * all the `.d.ts` files found within the directory specified by `dirPath`. The function recursively\n * searches through the directory and its subdirectories to find all `.d.ts` files and adds their paths\n * to the `\n * @param {any} ignorePatterns - The `ignorePatterns` parameter is an array of regex patterns used to\n * exclude certain files.\n * @param {any} ignoreFolders - The `ignoreFolders` parameter is an array of folder names to be ignored.\n * @returns The function `getDtsFiles` is returning an array containing the file paths of all the\n * TypeScript declaration files (files with a `.d.ts` extension) found within the specified directory\n * and its subdirectories.\n */\nconst getDtsFiles = (dirPath: any, filesList: any = [], ignorePatterns: any = [], ignoreFolders: any = []) => {\n const entries = fs.readdirSync(dirPath, { withFileTypes: true });\n for (const entry of entries) {\n const fullPath = path.join(dirPath, entry.name);\n if (entry.isDirectory()) {\n if (!ignoreFolders.includes(entry.name)) {\n getDtsFiles(fullPath, filesList, ignorePatterns, ignoreFolders);\n }\n } else if (entry.name.endsWith('.d.ts') && !ignorePatterns.some((pattern: any) => pattern.test(entry.name))) {\n filesList.push(fullPath);\n }\n }\n return filesList;\n}\n\n/**\n * The function fetches a file, removes import statements, export keywords, template literals, and\n * lines starting with //#, and returns the concatenated content.\n * @param {any} filePath - The `filePath` parameter in the `fetchAndConcatenate` function is a string\n * that represents the path to a file that will be read and processed.\n * @returns The function `fetchAndConcatenate` reads the content of a file specified by `filePath`,\n * removes import statements, export keywords, backticks (escaping them), template literals, and lines\n * starting with `//#`, and then returns the modified content as a concatenated string.\n */\nconst fetchAndConcatenate = (filePath: any) => {\n if (!fs.existsSync(filePath)) {\n throw new Error(`File not found: ${filePath}`);\n }\n return fs.readFileSync(filePath, 'utf8')\n .replace(/^import .*;$/gm, '') // Remove import statements\n .replace(/^export /gm, '') // Remove export keyword\n .replace(/`/g, '\\\\`') // Escape backticks\n .replace(/\\${[^}]*}/g, '') // Remove template literals\n .replace(/^\\/\\/#/gm, ''); // Remove lines starting with //#\n}\n\n/**\n * The `processFolder` function takes a folder path, retrieves all .d.ts files within the folder,\n * concatenates their content, and returns a string with the concatenated content.\n * @param {any} folderPath - The `folderPath` parameter in the `processFolder` function is the path to\n * the folder containing the .d.ts files that need to be processed.\n * @param {any} ignorePatterns - The `ignorePatterns` parameter is an array of regex patterns used to\n * exclude certain files.\n * @param {any} ignoreFolders - The `ignoreFolders` parameter is an array of folder names to be ignored.\n * @returns The `processFolder` function is returning a string that contains the contents of all the\n * \".d.ts\" files in the specified folder path. The contents are concatenated together and prefixed with\n * a comment indicating the folder path from which the contents were retrieved.\n */\nconst processFolder = (folderPath: any, ignorePatterns = [], ignoreFolders = []) => {\n const files = getDtsFiles(folderPath, [], ignorePatterns, ignoreFolders);\n const concatenatedContent = files.map(fetchAndConcatenate).join('');\n return `${concatenatedContent}\\n`;\n}\n\n/**\n * The function `consolidateFolders` takes an array of folder paths, processes each path using the\n * `processFolder` function, and returns a consolidated string of the processed folder paths.\n * @param {any[]} folders - The `folders` parameter in the `consolidateFolders` function is an array\n * that contains folder paths. Each folder path is represented as a string. The function uses the\n * `reduce` method to iterate over the array of folder paths and calls the `processFolder` function on\n * each path to process\n * @param {any} ignorePatterns - The `ignorePatterns` parameter is an array of regex patterns used to\n * exclude certain files.\n * @param {any} ignoreFolders - The `ignoreFolders` parameter is an array of folder names to be ignored.\n * @returns The `consolidateFolders` function is returning a string that is the result of concatenating\n * the processed folder paths from the input array of folders. Each folder path is processed using the\n * `processFolder` function before being concatenated to the accumulator.\n */\nconst consolidateFolders = (folders: any[], ignorePatterns: any = [], ignoreFolders: any = []) => {\n return folders.reduce((acc: string, folderPath: any) => {\n return acc + `${processFolder(folderPath, ignorePatterns, ignoreFolders)}`;\n }, '');\n}\n\n/**\n * List of method names to ignore in code suggestions\n * angular lifecycle hooks & components constructor should be skipped\n */\nconst methodsToIgnore = [\n 'constructor',\n 'ngOnInit',\n 'ngOnChanges',\n 'ngDoCheck',\n 'ngAfterViewInit',\n 'ngAfterViewChecked',\n 'ngAfterContentInit',\n 'ngAfterContentChecked',\n 'ngOnDestroy',\n 'ngOnDetach',\n 'ngOnAttach'\n];\n\ntry {\n /* Consolidates the content of multiple .d.ts files from specified folders into a single file,\n excluding certain files and methods. */\n const folderPaths = ['src/app/code-intellisense', `node_modules/${WM_NPM_SCOPE}/app-ng-runtime/components`, `node_modules/${WM_NPM_SCOPE}/app-ng-runtime/variables/model`, `node_modules/${WM_NPM_SCOPE}/variables/src/model`];\n const outputPath = 'src/app/code-intellisense/declaration-content.ts';\n const ignorePatterns = [/index.d.ts$/, /public_api.d.ts$/, /router-outlet.directive.d.ts$/, /spa-page.directive.d.ts$/, /(\\.props|\\.module|\\.utils)\\.d\\.ts$/]; // Add patterns to ignore\n const ignoreFolders = ['framework', 'pipes', 'utils']; // Add folder names to ignore\n let libContent = `export const suggestions = \\`\\n${consolidateFolders(folderPaths, ignorePatterns, ignoreFolders)}\\``;\n methodsToIgnore.forEach(method => {\n const methodRegex = new RegExp(`\\\\s*${method}\\\\s*\\\\([^)]*\\\\)(\\\\s*:\\\\s*void)?;?\\\\s*`, 'g');\n libContent = libContent.replace(methodRegex, '');\n });\n fs.writeFileSync(outputPath, libContent);\n console.log('All widget contents have been successfully written to:', outputPath);\n} catch (error) {\n console.error('Error processing widget files:', error);\n}\n"]}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Central WaveMaker npm namespace configuration.
3
+ *
4
+ * All source files import WM_NPM_SCOPE from here instead of hardcoding
5
+ * '@wavemaker'. Override via the WM_NPM_SCOPE environment variable to
6
+ * switch namespaces at build or runtime.
7
+ *
8
+ * Default: '@wavemaker-ai'
9
+ * Override: WM_NPM_SCOPE=@wavemaker node scripts/build.js post-build
10
+ */
11
+ export const WM_NPM_SCOPE: string;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Central WaveMaker npm namespace configuration.
3
+ *
4
+ * All source files import WM_NPM_SCOPE from here instead of hardcoding
5
+ * '@wavemaker'. Override via the WM_NPM_SCOPE environment variable to
6
+ * switch namespaces at build or runtime.
7
+ *
8
+ * Default: '@wavemaker-ai'
9
+ * Override: WM_NPM_SCOPE=@wavemaker node scripts/build.js post-build
10
+ */
11
+ var WM_NPM_SCOPE = process.env.WM_NPM_SCOPE || '@wavemaker-ai';
12
+ module.exports = { WM_NPM_SCOPE: WM_NPM_SCOPE };
13
+ //# sourceMappingURL=wm-namespace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wm-namespace.js","sourceRoot":"./","sources":["src/wm-namespace.js"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,IAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,eAAe,CAAC;AAEjE,MAAM,CAAC,OAAO,GAAG,EAAE,YAAY,cAAA,EAAE,CAAC","sourcesContent":["/**\n * Central WaveMaker npm namespace configuration.\n *\n * All source files import WM_NPM_SCOPE from here instead of hardcoding\n * '@wavemaker'. Override via the WM_NPM_SCOPE environment variable to\n * switch namespaces at build or runtime.\n *\n * Default: '@wavemaker-ai'\n * Override: WM_NPM_SCOPE=@wavemaker node scripts/build.js post-build\n */\nconst WM_NPM_SCOPE = process.env.WM_NPM_SCOPE || '@wavemaker-ai';\n\nmodule.exports = { WM_NPM_SCOPE };\n"]}
@@ -0,0 +1,21 @@
1
+ export let entry: string;
2
+ export namespace module {
3
+ let rules: {
4
+ test: RegExp;
5
+ use: string;
6
+ exclude: RegExp;
7
+ }[];
8
+ }
9
+ export namespace resolve {
10
+ let extensions: string[];
11
+ }
12
+ export let devtool: string;
13
+ export namespace output {
14
+ let filename: string;
15
+ let path: string;
16
+ namespace library {
17
+ let type: string;
18
+ let name: string;
19
+ }
20
+ let globalObject: string;
21
+ }
@@ -0,0 +1,28 @@
1
+ var path = require('path');
2
+ module.exports = {
3
+ entry: './index.ts',
4
+ module: {
5
+ rules: [
6
+ {
7
+ test: /\.ts?$/,
8
+ use: 'ts-loader',
9
+ exclude: /node_modules/,
10
+ },
11
+ ],
12
+ },
13
+ resolve: {
14
+ extensions: ['.ts', '.js'],
15
+ },
16
+ devtool: 'inline-source-map',
17
+ output: {
18
+ filename: 'index.js',
19
+ path: path.resolve(__dirname, 'dist/umd'),
20
+ library: {
21
+ type: 'umd',
22
+ name: 'wm_common_variables',
23
+ },
24
+ // prevent error: `Uncaught ReferenceError: self is not define`
25
+ globalObject: 'window',
26
+ },
27
+ };
28
+ //# sourceMappingURL=webpack.config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webpack.config.js","sourceRoot":"./","sources":["webpack.config.js"],"names":[],"mappings":"AAAA,IAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAE7B,MAAM,CAAC,OAAO,GAAG;IACf,KAAK,EAAE,YAAY;IACnB,MAAM,EAAE;QACN,KAAK,EAAE;YACL;gBACE,IAAI,EAAE,QAAQ;gBACd,GAAG,EAAE,WAAW;gBAChB,OAAO,EAAE,cAAc;aACxB;SACF;KACF;IACD,OAAO,EAAE;QACP,UAAU,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;KAC3B;IACD,OAAO,EAAE,mBAAmB;IAC5B,MAAM,EAAE;QACN,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,UAAU,CAAC;QACzC,OAAO,EAAE;YACP,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,qBAAqB;SAC5B;QACD,+DAA+D;QAC/D,YAAY,EAAE,QAAQ;KACvB;CACF,CAAC","sourcesContent":["const path = require('path');\n\nmodule.exports = {\n entry: './index.ts',\n module: {\n rules: [\n {\n test: /\\.ts?$/,\n use: 'ts-loader',\n exclude: /node_modules/,\n },\n ],\n },\n resolve: {\n extensions: ['.ts', '.js'],\n },\n devtool: 'inline-source-map',\n output: {\n filename: 'index.js',\n path: path.resolve(__dirname, 'dist/umd'),\n library: {\n type: 'umd',\n name: 'wm_common_variables',\n },\n // prevent error: `Uncaught ReferenceError: self is not define`\n globalObject: 'window',\n },\n};"]}