Skip to content

Releases: thaitype/nammatham

v2.0.0-alpha.13

11 Apr 07:29
Compare
Choose a tag to compare
v2.0.0-alpha.13 Pre-release
Pre-release
  • Add HTTP Response Helper
  • Make initNammatham create Azure Functions for default
  • Add new Azure Functions trigger for storageQueue

What's Changed

  • Add HTTP response Helper & Make initNammatham create Azure Functions for default by @mildronize in #131

Full Changelog: v2.0.0-alpha.12...v2.0.0-alpha.13

v2.0.0-alpha.12

22 Jan 04:21
Compare
Choose a tag to compare
v2.0.0-alpha.12 Pre-release
Pre-release

Fix: pino-dev package is missing when publish

Full Changelog: v2.0.0-alpha.11...v2.0.0-alpha.12

v2.0.0-alpha.11

22 Jan 04:08
Compare
Choose a tag to compare
v2.0.0-alpha.11 Pre-release
Pre-release

Fix: pnpm package lock in v2.0.0-alpha.10

Full Changelog: v2.0.0-alpha.10...v2.0.0-alpha.11

v2.0.0-alpha.10

22 Jan 04:08
Compare
Choose a tag to compare
v2.0.0-alpha.10 Pre-release
Pre-release

What's Changed

Before

app.register(expressPlugin());

After

const dev = process.env.NODE_ENV === 'development';
app.register(expressPlugin({ dev }));

Full Changelog: v2.0.0-alpha.9...v2.0.0-alpha.10

v2.0.0-alpha.9

22 Jan 04:07
Compare
Choose a tag to compare
v2.0.0-alpha.9 Pre-release
Pre-release

What's Changed

Full Changelog: v2.0.0-alpha.8...v2.0.0-alpha.9

v2.0.0-alpha.8

05 Jan 14:19
Compare
Choose a tag to compare
v2.0.0-alpha.8 Pre-release
Pre-release

Note: Breaking Changes

Before: in handler uses 2 params like Azure Functions Official Lib, e.g.

(request: HttpRequest, ctx: NammathamContext) => HttpResponse

Full Example:

import { initNammatham } from '@nammatham/core';
import { AzureFunctionsAdapter } from '@nammatham/azure-functions';

const n = initNammatham.create(new AzureFunctionsAdapter());
export const func = n.func;

export default func
  .httpGet('hello')
  .handler(async (request, ctx) => ({ body: 'OK' }) );

After:

interface NammathamContext {
   context: InvocationContext;
   trigger: HttpTrigger; // Using `trigger` instead of `input` because preventing confuse with Azure Functions `extraInput` and `inputs` modules.
}
(ctx: NammathamContext) => HttpResponse

Full Example

import { AzureFunctionsAdapter } from "@nammatham/azure-functions";
import { initNammatham } from "@nammatham/core";
import { expressPlugin } from "@nammatham/express";

const n = initNammatham.create(new AzureFunctionsAdapter());
const func = n.func;
const app = n.app;

const helloFunction = func
  .httpGet('hello', {
    route: 'hello-world',
  })
  .handler(async ({trigger, context}) => {
    context.log('HTTP trigger function processed a request.');
    context.debug(`Http function processed request for url "${trigger.url}"`);
    const name = trigger.query.get('name') || (await trigger.text()) || 'world';
    return { body: `Hello, ${name}!` };
  });

app.addFunctions(helloFunction);
app.register(expressPlugin());
app.start();

What's Changed

  • Issue 98: Apply single params for Azure Functions Handler by @mildronize in #105

Full Changelog: v2.0.0-alpha.6...v2.0.0-alpha.8

v2.0.0-alpha.6

02 Jan 03:46
Compare
Choose a tag to compare
v2.0.0-alpha.6 Pre-release
Pre-release

What's Changed

  • Add timer trigger to Azure Functions Adapter (issues-93) by @mildronize in #94

Full Changelog: v2.0.0-alpha.5...v2.0.0-alpha.6

v2.0.0-alpha.5

02 Jan 03:33
Compare
Choose a tag to compare
v2.0.0-alpha.5 Pre-release
Pre-release

1.3.0

27 Feb 03:08
Compare
Choose a tag to compare

What's Changed

1. Add Blob Trigger and Bindings helper function and their types #67

2. Add Service Bus Trigger and Bindings helper function and their types #69

2.1 Add Context.bindingData for trigger type

interface TypedContext {
  bindingData: TypedContextBindingData<T>;
}
If binding type is serviceBusTrigger, bindingData will be below:
export interface ServiceBusTriggerContextBindingData {
  /**
   * Enqueue Time UTC
   */
  enqueuedTimeUtc: any;

  /**
   * Delivery Count
   */
  deliveryCount: any;

  /**
   * Message ID
   */
  messageId: any;
}
If binding type is httpTrigger, bindingData will be below:
export interface HttpTriggerContextBindingData {
  query: {
    [name: string]: any;
  };
  headers: {
    [name: string]: any;
  };
  sys: {
    methodName: string;
    utcNow: string;
    randGuid: string;
  };
}

4. Improve binding helper inline doc of each property #65

Before

CleanShot 2566-02-26 at 10 33 40

After

CleanShot 2566-02-26 at 10 32 55

Affected Binding Helpers

  • binding.http()
  • binding.http_withReturn()
  • binding.timerTrigger()
  • binding.cosmosDBTrigger_v2()
  • binding.cosmosDBTrigger_v4()
  • binding.cosmosDBTrigger()
  • binding.cosmosDB_output_v2()
  • binding.cosmosDB_output_v4()
  • binding.cosmosDB_output()
  • binding.cosmosDB_input_v2()
  • binding.cosmosDB_input_v4()
  • binding.cosmosDB_input()
  • binding.blobTrigger()
  • binding.blob_input()
  • binding.blob_output()
  • binding.serviceBusTrigger()
  • binding.serviceBus_output()

Pull Requests

  • Improve binding helper inline doc of each property by @mildronize in #65
  • Add Blob Trigger and Bindings helper function and their types by @mildronize in #67
  • Add Service Bus Trigger and Bindings helper function and their types by @mildronize in #69

Full Changelog: 1.2.0...1.3.0

1.2.0

24 Feb 14:52
Compare
Choose a tag to compare

What's Changed

Full Changelog: 1.1.1-beta...1.2.0