sdk fixes
This commit is contained in:
@@ -5,7 +5,7 @@ import Constants from 'expo-constants';
|
||||
import type { MixanOptions } from '@mixan/sdk';
|
||||
import { Mixan } from '@mixan/sdk';
|
||||
|
||||
type MixanNativeOptions = MixanOptions
|
||||
type MixanNativeOptions = MixanOptions;
|
||||
|
||||
export class MixanNative extends Mixan<MixanNativeOptions> {
|
||||
constructor(options: MixanNativeOptions) {
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@mixan/sdk": "workspace:*",
|
||||
"@mixan/types": "workspace:*"
|
||||
"@mixan/sdk": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@mixan/eslint-config": "workspace:*",
|
||||
"@mixan/prettier-config": "workspace:*",
|
||||
"@mixan/tsconfig": "workspace:*",
|
||||
"@mixan/types": "workspace:*",
|
||||
"eslint": "^8.48.0",
|
||||
"prettier": "^3.0.3",
|
||||
"tsup": "^7.2.0",
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@mixan/sdk": "workspace:*",
|
||||
"@mixan/sdk-web": "workspace:*",
|
||||
"@mixan/types": "workspace:*"
|
||||
"@mixan/sdk-web": "workspace:*"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"next": "^13.0.0"
|
||||
@@ -21,6 +20,7 @@
|
||||
"@mixan/eslint-config": "workspace:*",
|
||||
"@mixan/prettier-config": "workspace:*",
|
||||
"@mixan/tsconfig": "workspace:*",
|
||||
"@mixan/types": "workspace:*",
|
||||
"eslint": "^8.48.0",
|
||||
"prettier": "^3.0.3",
|
||||
"tsup": "^7.2.0",
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@mixan/sdk": "workspace:*",
|
||||
"@mixan/types": "workspace:*"
|
||||
"@mixan/sdk": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@mixan/eslint-config": "workspace:*",
|
||||
"@mixan/prettier-config": "workspace:*",
|
||||
"@mixan/tsconfig": "workspace:*",
|
||||
"@mixan/types": "workspace:*",
|
||||
"eslint": "^8.48.0",
|
||||
"prettier": "^3.0.3",
|
||||
"tsup": "^7.2.0",
|
||||
|
||||
@@ -121,10 +121,6 @@ export class Mixan<Options extends MixanOptions = MixanOptions> {
|
||||
|
||||
// Public
|
||||
|
||||
public init(properties?: Record<string, unknown>) {
|
||||
this.state.properties = properties ?? {};
|
||||
}
|
||||
|
||||
public setProfileId(profileId: string) {
|
||||
this.state.profileId = profileId;
|
||||
}
|
||||
@@ -206,6 +202,7 @@ export class Mixan<Options extends MixanOptions = MixanOptions> {
|
||||
public clear() {
|
||||
this.state.properties = {};
|
||||
this.state.deviceId = undefined;
|
||||
this.state.profileId = undefined;
|
||||
if (this.options.removeDeviceId) {
|
||||
this.options.removeDeviceId();
|
||||
}
|
||||
|
||||
@@ -8,13 +8,12 @@
|
||||
"format": "prettier --check \"**/*.{mjs,ts,md,json}\"",
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@mixan/types": "workspace:*"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@mixan/eslint-config": "workspace:*",
|
||||
"@mixan/prettier-config": "workspace:*",
|
||||
"@mixan/tsconfig": "workspace:*",
|
||||
"@mixan/types": "workspace:*",
|
||||
"eslint": "^8.48.0",
|
||||
"prettier": "^3.0.3",
|
||||
"tsup": "^7.2.0",
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
"devDependencies": {
|
||||
"@mixan/eslint-config": "workspace:*",
|
||||
"@mixan/prettier-config": "workspace:*",
|
||||
"@mixan/tsconfig": "workspace:*",
|
||||
"eslint": "^8.48.0",
|
||||
"prettier": "^3.0.3",
|
||||
"tsup": "^7.2.0",
|
||||
|
||||
@@ -1,19 +1,6 @@
|
||||
{
|
||||
"extends": "@mixan/tsconfig/sdk.json",
|
||||
"compilerOptions": {
|
||||
"lib": ["ESNext"],
|
||||
"module": "esnext",
|
||||
"target": "esnext",
|
||||
"moduleResolution": "bundler",
|
||||
"moduleDetection": "force",
|
||||
"allowImportingTsExtensions": true,
|
||||
"noEmit": true,
|
||||
"composite": true,
|
||||
"strict": true,
|
||||
"downlevelIteration": true,
|
||||
"skipLibCheck": true,
|
||||
"jsx": "react-jsx",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"allowJs": true
|
||||
"outDir": "dist"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { defineConfig } from 'tsup';
|
||||
|
||||
import config from '@mixan/tsconfig/tsup.config.json' assert { type: 'json' };
|
||||
|
||||
export default defineConfig({
|
||||
entry: ['index.ts'],
|
||||
format: ['cjs', 'esm'], // Build for commonJS and ESmodules
|
||||
dts: true, // Generate declaration file (.d.ts)
|
||||
splitting: false,
|
||||
sourcemap: false,
|
||||
clean: true,
|
||||
...(config as any),
|
||||
entry: ['index.ts', 'cdn.ts'],
|
||||
format: ['cjs', 'esm', 'iife'],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user