@tachybase/plugin-pagespy 1.4.0

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,7 @@
1
+ export declare const NAMESPACE = "@tachybase/plugin-pagespy";
2
+ export declare function usePluginTranslation(): any;
3
+ export declare function useTranslation(): {
4
+ t: (key: string, options?: {}) => string;
5
+ };
6
+ export declare function lang(key: string, options?: {}): string;
7
+ export declare const tval: (key: string) => string;
@@ -0,0 +1,5 @@
1
+ import { Plugin } from '@tachybase/client';
2
+ declare class PluginPluginPagespy extends Plugin {
3
+ load(): Promise<void>;
4
+ }
5
+ export default PluginPluginPagespy;
@@ -0,0 +1,3 @@
1
+ export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
2
+ container: import("antd-style").SerializedStyles;
3
+ }>;
@@ -0,0 +1,10 @@
1
+ module.exports = {
2
+ "@tachybase/client": "1.4.0",
3
+ "@ant-design/icons": "5.6.1",
4
+ "antd": "5.22.5",
5
+ "@tachybase/schema": "1.3.52",
6
+ "lodash": "4.17.21",
7
+ "react": "18.3.1",
8
+ "react-dom": "18.3.1",
9
+ "@tego/server": "1.3.52"
10
+ };
@@ -0,0 +1,2 @@
1
+ export * from './server';
2
+ export { default } from './server';
package/dist/index.js ADDED
@@ -0,0 +1,39 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var index_exports = {};
30
+ __export(index_exports, {
31
+ default: () => import_server.default
32
+ });
33
+ module.exports = __toCommonJS(index_exports);
34
+ __reExport(index_exports, require("./server"), module.exports);
35
+ var import_server = __toESM(require("./server"));
36
+ // Annotate the CommonJS export names for ESM import in node:
37
+ 0 && (module.exports = {
38
+ ...require("./server")
39
+ });
@@ -0,0 +1,4 @@
1
+ {
2
+ "PageSpy config": "PageSpy config",
3
+ "Project name": "Project name"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "PageSpy config": "PageSpy配置",
3
+ "Project name": "项目名称"
4
+ }
@@ -0,0 +1,3 @@
1
+ import { CollectionOptions } from '@tego/server';
2
+ declare const _default: CollectionOptions;
3
+ export default _default;
@@ -0,0 +1,44 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var pagespy_exports = {};
19
+ __export(pagespy_exports, {
20
+ default: () => pagespy_default
21
+ });
22
+ module.exports = __toCommonJS(pagespy_exports);
23
+ var pagespy_default = {
24
+ name: "pagespy",
25
+ shared: true,
26
+ createdAt: false,
27
+ updatedAt: false,
28
+ createdBy: false,
29
+ updatedBy: false,
30
+ fields: [
31
+ {
32
+ type: "string",
33
+ name: "api"
34
+ },
35
+ {
36
+ type: "string",
37
+ name: "project"
38
+ },
39
+ {
40
+ type: "string",
41
+ name: "title"
42
+ }
43
+ ]
44
+ };
@@ -0,0 +1 @@
1
+ export { default } from './plugin';
@@ -0,0 +1,33 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+ var server_exports = {};
29
+ __export(server_exports, {
30
+ default: () => import_plugin.default
31
+ });
32
+ module.exports = __toCommonJS(server_exports);
33
+ var import_plugin = __toESM(require("./plugin"));
@@ -0,0 +1,5 @@
1
+ import { Plugin } from '@tego/server';
2
+ export declare class PluginPluginPagespy extends Plugin {
3
+ load(): Promise<void>;
4
+ }
5
+ export default PluginPluginPagespy;
@@ -0,0 +1,50 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var plugin_exports = {};
19
+ __export(plugin_exports, {
20
+ PluginPluginPagespy: () => PluginPluginPagespy,
21
+ default: () => plugin_default
22
+ });
23
+ module.exports = __toCommonJS(plugin_exports);
24
+ var import_server = require("@tego/server");
25
+ class PluginPluginPagespy extends import_server.Plugin {
26
+ async load() {
27
+ this.app.on("afterStart", async () => {
28
+ const PageSpyRecord = await this.app.db.getRepository("pagespy").findOne();
29
+ if (!PageSpyRecord) {
30
+ await this.app.db.getRepository("pagespy").create({
31
+ values: {
32
+ id: 1,
33
+ api: "localhost:6752",
34
+ project: "tachybase-debug",
35
+ title: "tachybase"
36
+ }
37
+ });
38
+ }
39
+ });
40
+ this.app.acl.registerSnippet({
41
+ name: `pm.system-services.pagespy-config`,
42
+ actions: ["pagespy:*"]
43
+ });
44
+ }
45
+ }
46
+ var plugin_default = PluginPluginPagespy;
47
+ // Annotate the CommonJS export names for ESM import in node:
48
+ 0 && (module.exports = {
49
+ PluginPluginPagespy
50
+ });
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@tachybase/plugin-pagespy",
3
+ "displayName": "PageSpy",
4
+ "version": "1.4.0",
5
+ "description": "PageSpy plugin for low-code platform, capturing user behavior and analytics",
6
+ "keywords": [
7
+ "Others"
8
+ ],
9
+ "main": "dist/server/index.js",
10
+ "devDependencies": {
11
+ "@ant-design/icons": "^5.6.1",
12
+ "@huolala-tech/page-spy-browser": "^2.2.5",
13
+ "@huolala-tech/page-spy-plugin-data-harbor": "^2.2.5",
14
+ "@huolala-tech/page-spy-plugin-rrweb": "^2.2.3",
15
+ "@tachybase/schema": "*",
16
+ "@tachybase/test": "1.3.52",
17
+ "@tego/client": "1.3.52",
18
+ "@tego/server": "1.3.52",
19
+ "antd": "5.22.5",
20
+ "lodash": "^4.17.21",
21
+ "@tachybase/client": "1.4.0"
22
+ },
23
+ "description.zh-CN": "PageSpy 插件, 方便前端测试和记录",
24
+ "displayName.zh-CN": "页面监控"
25
+ }
package/server.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './dist/server';
2
+ export { default } from './dist/server';
package/server.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require('./dist/server/index.js');