feat: sdks and docs (#239)
* init * fix * update docs * bump: all sdks * rename types test
This commit is contained in:
committed by
GitHub
parent
790801b728
commit
83e223a496
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@openpanel/astro",
|
||||
"version": "1.0.2-local",
|
||||
"version": "1.0.3-local",
|
||||
"config": {
|
||||
"transformPackageJson": false,
|
||||
"transformEnvs": true
|
||||
@@ -14,7 +14,7 @@
|
||||
"files": ["src", "index.ts"],
|
||||
"keywords": ["astro-component"],
|
||||
"dependencies": {
|
||||
"@openpanel/web": "workspace:1.0.2-local"
|
||||
"@openpanel/web": "workspace:1.0.3-local"
|
||||
},
|
||||
"devDependencies": {
|
||||
"astro": "^5.7.7"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
import type { OpenPanelMethodNames, OpenPanelOptions } from '@openpanel/web';
|
||||
import { getInitSnippet } from '@openpanel/web';
|
||||
|
||||
type Props = Omit<OpenPanelOptions, 'filter'> & {
|
||||
profileId?: string;
|
||||
@@ -32,7 +33,7 @@ const methods: { name: OpenPanelMethodNames; value: unknown }[] = [
|
||||
value: {
|
||||
...options,
|
||||
sdk: 'astro',
|
||||
sdkVersion: '1.0.2',
|
||||
sdkVersion: '1.0.3',
|
||||
},
|
||||
},
|
||||
];
|
||||
@@ -51,7 +52,7 @@ if (globalProperties) {
|
||||
});
|
||||
}
|
||||
|
||||
const scriptContent = `window.op = window.op || function(...args) {(window.op.q = window.op.q || []).push(args)};
|
||||
const scriptContent = `${getInitSnippet()}
|
||||
${methods
|
||||
.map((method) => {
|
||||
return `window.op('${method.name}', ${stringify(method.value)});`;
|
||||
|
||||
Reference in New Issue
Block a user