Skip to content

Commit

Permalink
Merge branch 'next' into questionnaire-screen
Browse files Browse the repository at this point in the history
  • Loading branch information
scopsy authored Nov 26, 2024
2 parents 39cfd79 + 239d210 commit e6bd453
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 159 deletions.
2 changes: 1 addition & 1 deletion .source
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Injectable } from '@nestjs/common';
import { MessageRepository, SubscriberRepository } from '@novu/dal';
import { ChannelTypeEnum } from '@novu/shared';
import { buildMessageCountKey, CachedQuery } from '@novu/application-generic';
import { buildMessageCountKey, CachedQuery, InstrumentUsecase } from '@novu/application-generic';

import { GetFeedCountCommand } from './get-feed-count.command';
import { ApiException } from '../../../shared/exceptions/api.exception';
Expand All @@ -13,6 +13,7 @@ export class GetFeedCount {
private subscriberRepository: SubscriberRepository
) {}

@InstrumentUsecase()
@CachedQuery({
builder: ({ environmentId, subscriberId, ...command }: GetFeedCountCommand) =>
buildMessageCountKey().cache({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
buildSubscriberKey,
CachedEntity,
CachedQuery,
InstrumentUsecase,
} from '@novu/application-generic';
import { MessageRepository, SubscriberEntity, SubscriberRepository } from '@novu/dal';

Expand Down Expand Up @@ -33,6 +34,7 @@ export class GetNotificationsFeed {
}
}

@InstrumentUsecase()
@CachedQuery({
builder: ({ environmentId, subscriberId, ...command }: GetNotificationsFeedCommand) =>
buildFeedKey().cache({
Expand Down
9 changes: 9 additions & 0 deletions apps/dashboard/src/pages/workflows.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,17 @@ import { RiSearch2Line } from 'react-icons/ri';
import { CreateWorkflowButton } from '@/components/create-workflow-button';
import { OptInModal } from '@/components/opt-in-modal';
import { PageMeta } from '@/components/page-meta';
import { useTelemetry } from '../hooks';
import { TelemetryEvent } from '../utils/telemetry';
import { useEffect } from 'react';

export const WorkflowsPage = () => {
const track = useTelemetry();

useEffect(() => {
track(TelemetryEvent.WORKFLOWS_PAGE_VISIT);
}, [track]);

return (
<>
<PageMeta title="Workflows" />
Expand Down
1 change: 1 addition & 0 deletions apps/dashboard/src/utils/telemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ export enum TelemetryEvent {
CREATE_ORGANIZATION_FORM_SUBMITTED = 'Create Organization Form Submitted',
USE_CASE_SELECTED = 'Use Case Selected',
USE_CASE_SKIPPED = 'Use Case Skipped',
WORKFLOWS_PAGE_VISIT = 'Workflows page visit',
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"preinstall": "npx only-allow pnpm",
"preview:pkg:build": "nx affected -t build --base=origin/next --head=HEAD --exclude='*,!tag:package:public'",
"preview:pkg:publish": "node scripts/publish-preview-packages.mjs",
"release": "nx release",
"release": "node scripts/release.mjs",
"setup:project": "npx --yes pnpm@9.11.0 i && node scripts/setup-env-files.js && pnpm build",
"start:api:dev": "cross-env nx run @novu/api:start:dev",
"start:api:test": "cross-env nx run-many --target=start:test --projects=@novu/api",
Expand Down
77 changes: 0 additions & 77 deletions scripts/github-conventional-comments.js

This file was deleted.

79 changes: 0 additions & 79 deletions scripts/release-with-submodule.ts

This file was deleted.

46 changes: 46 additions & 0 deletions scripts/release.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import { releaseChangelog, releasePublish, releaseVersion } from 'nx/release/index.js';
import yargs from 'yargs/yargs';
import { hideBin } from 'yargs/helpers';

(async () => {
const options = yargs(hideBin(process.argv))
.version(false)
.option('version', {
description: 'Explicit version specifier to use, if overriding conventional commits',
type: 'string',
})
.option('dryRun', {
alias: 'd',
description: 'Whether or not to perform a dry-run of the release process, defaults to true',
type: 'boolean',
})
.option('verbose', {
description: 'Whether or not to enable verbose logging, defaults to false',
type: 'boolean',
default: false,
})
.parse();

const { workspaceVersion, projectsVersionData } = await releaseVersion({
specifier: options.version,
dryRun: options.dryRun,
verbose: options.verbose,
projects: ['tag:package:public'],
});

await releaseChangelog({
versionData: projectsVersionData,
version: workspaceVersion,
dryRun: options.dryRun,
verbose: options.verbose,
projects: ['tag:package:public'],
});

// The returned number value from releasePublish will be zero if all projects are published successfully, non-zero if not
const publishStatus = await releasePublish({
dryRun: options.dryRun,
verbose: options.verbose,
projects: ['tag:package:public'],
});
process.exit(publishStatus);
})();

0 comments on commit e6bd453

Please sign in to comment.